Quantcast
Channel: Recent Discussions — Plex Forums
Viewing all articles
Browse latest Browse all 151235

Request auth hash when user presses play

$
0
0

To access some Nimble streams, my pluging needs to:

  1. authenticate a user
  2. hit a php file, get an authentication hash,
  3. amend that hash to the media URL

This all needs to happen when the user presses play as the hash is only valid for a short period of time.

Is this doable, and if so how would I go about doing that?

The current media function I have is:

CHANNEL_OBJECT              = VideoClipObject(
    key                     = Callback(
        CreateChannelEpisodeObject,
        TITLE               = TITLE,
        URL                 = URL,
        SUMMARY             = SUMMARY,
        THUMB               = THUMB,
        INCLUDE_CONTAINER   = True
    ),
    rating_key              = URL,
    title                   = TITLE,
    summary                 = SUMMARY,
    thumb                   = R(THUMB),
    items                   = [
        MediaObject(
            video_resolution        = RESOLUTION,
            width                   = WIDTH,
            height                  = HEIGHT,
            audio_channels          = 2,
            optimized_for_streaming = True,
            video_frame_rate        = 25,
            parts                   =   [
                PartObject(
                    key             = HTTPLiveStreamURL(
                        url         = URL
                    )
                )
            ]
        )
    ]
)

So I'm unsure where to place the calls to get the extra hash.


Viewing all articles
Browse latest Browse all 151235

Trending Articles