Hello Yahoo team,
I have tried copying your technique to rwd and ffwd with no success. I am trying to test out the functionality in the simulator with no good results. Have I missed something here?
CODE
var VideoPlayer = new KONtx.Class({
ClassName: 'VideoPlayer',
Extends: KONtx.system.FullscreenView,
//---------------------------------------------------------------------------
// createView
//---------------------------------------------------------------------------
createView: function() {},
//---------------------------------------------------------------------------
// updateView
//---------------------------------------------------------------------------
updateView: function() {
var playlist = new KONtx.media.Playlist();
this.controls.overlay = new KONtx.control.MediaTransportOverlay({
fadeTimeout: 5,
fastforwardButton: true,
rewindButton: true,
events: {
onTransportButtonPress: function(event){
if(event.payload.button == "fastforward") {
event.preventDefault();
KONtx.mediaplayer.control.seek(10, true);
} else if(event.payload.button == "rewind") {
event.preventDefault();
KONtx.mediaplayer.control.seek(-10, true);
}
},
onControlSeek: function(event){
},
},
}).appendTo(this);
var video_playlist = KONtx.messages.fetch("video_playlist");
for(var counter = 0; counter < video_playlist.items.length; counter++){
playlist.addEntryByURL(video_playlist.items[counter].url);
}
KONtx.mediaplayer.playlist.set(playlist);
KONtx.mediaplayer.playlist.start();
KONtx.mediaplayer.playlist.loadEntry(this.persist.selected_video);
},
//---------------------------------------------------------------------------
// focusView
//---------------------------------------------------------------------------
focusView: function() {
},
//---------------------------------------------------------------------------
// hideView
//---------------------------------------------------------------------------
hideView: function() {
},
});
The media players developed by the current device manufacturers are optimized to support seeking using time index values that are passed between the widget and the media server. Supporting true fast forward and rewind functionality is resource intensive and not yet available on current Connected TV devices. An alternative approach is to use time index seeking to enable consumers to skip forward and skip backward within in a stream in multi-second increments from a relative or absolute time index. This workaround is very useful when playing videos that are longer than a few minutes.
We have a full blog post with all the details and a solution at: http://bit.ly/e8V7nA