Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stanislaw_busza
Binge Watcher

Video player ("Video" component) automatically unpauses without modyfing "control" field

Jump to solution

Hello, this is my first post here.

Sometimes Video player component unpauses by itself. I do not set control field, when observers are set to observe fields control and state i receive something like that:

  m.Video.observeField("state", "videoStateHandler")
  m.Video.observeField("control", "videoControlHandler")

sub videoControlHandler(event)
  ? "videoControlHandler", event.getData()
end sub

sub videoStateHandler(event)
  ? "videoStateHandler", event.getData()
end sub

and i get (in logs):

videoControlHandler pause
videoControlHandler resume
videoStateHandler buffering
videoStateHandler playing
videoControlHandler pause
videoStateHandler paused
videoStateHandler playing
videoControlHandler pause
videoStateHandler paused
videoStateHandler playing
 
So we can see here that i cannot effectively pause the video (after setting control field
to "pause" player automatically returns to the playing state).
 
Details:
Device: Roku premiere - 3920EU
Video format: DASH
 
Problem touches only Live / Restarted live events. Parts of manifest files below:
 
<?xml version="1.0" encoding="UTF-8" ?>
<MPD profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" availabilityStartTime="2021-12-13T13:06:06Z" minimumUpdatePeriod="PT2.0S" minBufferTime="PT2.0S" publishTime="2022-03-10T10:50:04Z" timeShiftBufferDepth="PT6M" suggestedPresentationDelay="PT2.0S" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:mspr="urn:microsoft:playready" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd">
	<Period start="PT0S" id="1">
		<AdaptationSet mimeType="video/mp4" startWithSAP="1" segmentAlignment="true">
			<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="e7266e5a-33fe-32f4-9283-3dca5e32c6cd"></ContentProtection>
			<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"><cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">AAAAS3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACsIARIQ5yZuWjP+MvSSgz3KXjLGzSIVYmFza2V0YmFsbGxlYWd1ZV9kYXNo</cenc:pssh></ContentProtection>
			<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4v" initialization="$RepresentationID$_init.m4i">
				<SegmentTimeline>
					<S t="75082865928370" d="20000000" r="179" />
				</SegmentTimeline>
			</SegmentTemplate>
			<Representation width="768" height="432" frameRate="25" codecs="avc1.640029" scanType="progressive" id="1639400758168item-01item" bandwidth="1100000" />
			<Representation width="768" height="432" frameRate="25" codecs="avc1.640029" scanType="progressive" id="1639400758168item-02item" bandwidth="1700000" />
			<Representation width="1280" height="720" frameRate="25" codecs="avc1.640029" scanType="progressive" id="1639400758168item-03item" bandwidth="2100000" />
			<Representation width="1280" height="720" frameRate="25" codecs="avc1.640029" scanType="progressive" id="1639400758168item-04item" bandwidth="2500000" />
		</AdaptationSet>
		<AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="heb" segmentAlignment="true">
			<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="e7266e5a-33fe-32f4-9283-3dca5e32c6cd"></ContentProtection>
			<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"><cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">AAAAS3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACsIARIQ5yZuWjP+MvSSgz3KXjLGzSIVYmFza2V0YmFsbGxlYWd1ZV9kYXNo</cenc:pssh></ContentProtection>
			<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4a" initialization="$RepresentationID$_init.m4i">
				<SegmentTimeline>
					<S t="75082866154620" d="20053333" r="1" />
					<S t="75082906261286" d="20053334" />
            
                    # many segments was cut here intentionally

					<S t="75086426261286" d="20053334" />
					<S t="75086446314620" d="19626666" />
				</SegmentTimeline>
			</SegmentTemplate>
			<Representation audioSamplingRate="48000" codecs="mp4a.40.5" id="1639400758168item-05item" bandwidth="40000" />
		</AdaptationSet>
	</Period>
</MPD>

 

The same happens in ROKU stream tester!

0 Kudos
1 Solution

Accepted Solutions
renojim
Community Streaming Expert

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

I don't have any experience with it, but check out LiveBoundsPauseBehavior under:

https://developer.roku.com/docs/developer-program/getting-started/architecture/content-metadata.md

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.

View solution in original post

0 Kudos
7 REPLIES 7
renojim
Community Streaming Expert

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

You can't pause a live stream forever if that's what you're trying to do.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
stanislaw_busza
Binge Watcher

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

Why do you mean forever ? Why not ? Why not still frame ?

It happens not only on LIVE tv but also on TSTV for live event (event end moves into future but its start is fixed).

0 Kudos
renojim
Community Streaming Expert

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

Forever in this instance means until the Roku's limited buffer fills.  Once it's full it has to do something.  I don't recall if it's an option or not, but clearly the default is to start playing the stream once the buffer fills.

Sorry, I don't know what "TSTV" means.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
stanislaw_busza
Binge Watcher

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

Ok, thank you for answer. Pausing forever is the best description of what i want to do.

"I don't recall if it's an option or not, but clearly the default is to start playing the stream once the buffer fills."

The matter of this task is to find that option or post a bug to ROKU when this option is not present in the video element 🙂

TSTV means time shifted television, so when on live stream we hit a restart button on that particular event. In that case we change manifest and start of the stream is fixed and available to be downloaded. We can seek and do trickplay from beginning to the actual live point.

0 Kudos
renojim
Community Streaming Expert

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

I don't have any experience with it, but check out LiveBoundsPauseBehavior under:

https://developer.roku.com/docs/developer-program/getting-started/architecture/content-metadata.md

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
stanislaw_busza
Binge Watcher

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

Thank you very much 🙂 that is the exact thing that i wanted. I implemented the solution that you proposed and it simply.... works! 🙂

0 Kudos
renojim
Community Streaming Expert

Re: Video player ("Video" component) automatically unpauses without modyfing "control

Jump to solution

Great!  I'm glad you got it working the way you wanted.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos