Permalink
Browse files

WebFrontend: Reduce bitrates in line with a different Apple doc, not …

…sure which of the two is authoritative but might as well go with the one which allows smoother streaming.
  • Loading branch information...
stuartm committed Feb 27, 2014
1 parent a89180c commit ebeed19e3d0ccf0dbfe12327053d54bf68953393
Showing with 10 additions and 4 deletions.
  1. +10 −4 mythtv/html/tv/tvplayer.qsp
@@ -39,9 +39,9 @@ import "/tv/js/tvutil.qjs"
// Relative bitrates and resolutions taken from
// https://developer.apple.com/library/ios/technotes/tn2224/_index.html#//apple_ref/doc/uid/DTS40009745-CH1-SETTINGSFILES
if (videoProfile == "720p")
- streamInfo = content.AddRecordingLiveStream(chanID, startTime, 0, 1280, 720, 4500000, 64000, -1); // Local - 4.5Mbps 1280x720
+ streamInfo = content.AddRecordingLiveStream(chanID, startTime, 0, 1280, 720, 2500000, 64000, -1); // Local - 2.5Mbps 1280x720
else
- streamInfo = content.AddRecordingLiveStream(chanID, startTime, 0, 640, 360, 800000, 64000, -1); // Remote - 800 Kbps 640x360
+ streamInfo = content.AddRecordingLiveStream(chanID, startTime, 0, 640, 360, 600000, 40000, -1); // Remote - 600 Kbps 640x360
var streamID = 0;
if (isValidObject(streamInfo))
@@ -98,8 +98,7 @@ import "/tv/js/tvutil.qjs"
<div id="playerControlBar">
<div id="playerControls">
- <button id="playButton" class="playbackControl" onClick="jwplayer('player').play()">Play</button>&nbsp;
- <button id="pauseButton" class="playbackControl" onClick="jwplayer('player').pause()">Pause</button>&nbsp;
+ <button id="playButton" class="playbackControl" onClick="play()">Play</button>&nbsp;
<button id="stopButton" class="playbackControl" onClick="jwplayer('player').stop()">Stop</button>&nbsp;
<button id="muteButton" class="playbackControl" onClick="jwplayer('player').setMute()">Mute</button>&nbsp;
<label for="hlsProfileList">
@@ -155,6 +154,13 @@ import "/tv/js/tvutil.qjs"
var duration = <%=(program.Recording.EndTs - program.Recording.StartTs) / 1000%>;
var previewImage = "<%=previewImage%>";
+ function play()
+ {
+ jwplayer('player').load({file: playlist, provider: "/StorageGroup/3rdParty/JW_Player/adaptiveProvider.swf"});
+ jwplayer('player').play();
+ return;
+ }
+
jwplayer('player').setup({
file: playlist,
width: width,

0 comments on commit ebeed19

Please sign in to comment.