Jump to content

Webhook playback messages identifying it is playing a cinematic intro


BillOatman
 Share

Recommended Posts

Currently playback webhook messages are sent to the endpoints for both the intro and the video itself (which is reasonable).  For example

playback.start  For the intro
playback.stop  For the Intro
playback.start For the video

playback.stop For the video

Unfortunately there is nothing in the message json payload that identifies the first 2 messages as an intro. In my case, I am creating a webhook endpoint to control setting the scene in a Philips Hue light controller based on state of the video.  And getting these start/stop scenes being set like this makes the lighting look bad.  I request a new field in the json payload to indicate  it is for an Intro.

I suspect this would be helpful for anything consuming playback messages.
 

Link to comment
Share on other sites

Hi.  In the case you are outlining (lighting scene control) what is the difference between playing intros or just any other video back to back?

I mean, if there were four episodes queued up, your lights are going to go up and down between them as well, no...?

Link to comment
Share on other sites

1 hour ago, ebr said:

Hi.  In the case you are outlining (lighting scene control) what is the difference between playing intros or just any other video back to back?

I mean, if there were four episodes queued up, your lights are going to go up and down between them as well, no...?

Yes they would go up then back down in that case if you were binging episodes back to back.  My plan is to try and figure out a way to know you are in that "binge mode", or maybe when a stop is received and its a episode and not a movie delay to see if a start is received within a certain amount of time for example.  Or maybe request a json field in the stop message to indicate binge mode is on ;) hehe.   But there are potential mitigations around that particular light level bounce.   

For now I added the text "-intro-" into the filenames for those Intro video files on my server and I am keying off of that.  In the current code I am considering Intro a light level state just like play and pause for example and can set a light level scene  for it specifically as well.

Rather than a json field I suppose a new message type, playback-intro-start/stop would work as well, but it seemed like overkill.  But there is a "scrobble" message now, so maybe not?

Edited by BillOatman
Link to comment
Share on other sites

Okay, my point is the fact that it is an intro isn't really the issue here.  It is the sequence of consecutive items playing so what you are requesting here doesn't solve the real problem.  What would really be needed would be some sort of playlist started and stopped events - which the system doesn't have any knowledge of at this time.

Link to comment
Share on other sites

1 minute ago, ebr said:

Okay, my point is the fact that it is an intro isn't really the issue here.  It is the sequence of consecutive items playing so what you are requesting here doesn't solve the real problem.  What would really be needed would be some sort of playlist started and stopped events - which the system doesn't have any knowledge of at this time.

The system does right, intros are configurable off of on so something knows.  Hmmm maybe there is a way I can look to see if intros are configured or not and deal with it that way.  It gets ugly because then I'd need to maintain my own state for each device.

Link to comment
Share on other sites

I still think you are thinking about this the wrong way.  The issue isn't the intros - that is just the symptom.  The real issue is consecutive item playback - regardless of what those items are.

Link to comment
Share on other sites

3 minutes ago, ebr said:

I still think you are thinking about this the wrong way.  The issue isn't the intros - that is just the symptom.  The real issue is consecutive item playback - regardless of what those items are.

Perhaps, for the specific case of episodes playing back to back. But in everything I can think of except that one use case, knowing it's an intro solves the issue.  Plus gives me the bonus of being able to react differently if it is an intro like a slight dimming similar to what movie theaters do during their pre-movie advertisements before a full lights down/off for the feature.

Link to comment
Share on other sites

@chef Had a good thought in the developer thread, look at the run length and if its shorter than some period of time assume its an intro.  The playback.start and stop payloads have

"RunTimeTicks": 160250000,

Which is a viable way to go about it as well.

Edited by BillOatman
Link to comment
Share on other sites

1 hour ago, BillOatman said:

But in everything I can think of except that one use case

Play a collection?  Play a playlist?  Shuffle play a genre...?

Lots of other possible cases for multi-item playback but, if using length gets you what you want, then you're good to go.

Link to comment
Share on other sites

35 minutes ago, ebr said:

Play a collection?  Play a playlist?  Shuffle play a genre...?

Never done any of those things, didn't even know they were possible :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...