0

Fast Expiring Content problem ( black screen in TV, works fine in simulator )

I am having trouble showing prerolls before our VOD's on a Vizio M221NV. I'm getting a black screen whenever it tries to play a preroll around 15 seconds long. The UI is still fully functional and I can navigate around my fullscreen view perfectly fine but nothing ever gets played. In the simulator, the preroll works perfectly fine and everything works as it's suppose to so this seemes to be a TV only error.

I'm 
using the Fast Expiring Content example from the docs and from another post here in the forums to account for the very short length. Here is my custom playlist class ( I don't see an option where I can post code blocks so excuse me if it comes up as plain text ).

CODE
var CustomPlaylistEntry = new KONtx.Class({    Extends: KONtx.media.PlaylistEntry,    config: {        adClips: null    },       initialize: function() {        this.parent();        this._urlsFetched = false;    },       streamsReady: function(callback) {        if(!this._urlsFetched) {            this._fetchContentURLs(callback);            return false;        } else {            return true;        }        },    _fetchContentURLs: function(callback) {    	for(var i=0;i<this.config.adClips.length;i++){        		this.addURL(this.config.adClips[i].url, this.config.adClips[i].bitrate);        	}        this._urlsFetched = true;         callback();    }    });
I'm given the preroll URL in multiple bitrates so I needed to add multiple streams to my Playlist entry.


Here is how I am creating the playlist entries; all my playlists will only be two items long (a preroll before VOD):

CODE
if(this.readyState == 4 && this.status == 200){		var vast = XMLDOM.parse(this.responseXML.toXML());	var imp = vast.getElementsByTagName("Impression");	var data = {		pixels : [],		clips : []	};	for(var i=0;i<imp.length;i++){		var c = imp.item(i);		var px = c.firstChild.data;		var img = new KONtx.element.Image({			src: px.trim().clean(),			styles:{				height:1,				width: 1			}		});	}	var media = vast.getElementsByTagName("MediaFile");	for(var j=0;j<media.length;j++){		var c = media.item(j);		var url1 = c.firstChild.data;		url1 = url1.trim().clean();		var bitrate1 = c.getAttribute("bitrate");		data.clips.push({url:url1, bitrate:bitrate1});	}	var playlist = new KONtx.media.Playlist();	playlist.addEntry(new CustomPlaylistEntry({adClips: data.clips}));	playlist.addEntry(new KONtx.media.PlaylistEntry({streams: np.video}));	callback(playlist);	log("#######!@#!@#!!!!!! - "+ $dump(data.clips));	log("#######!@#!@#!!!!!! - "+ $dump(np.video));	    var bounds = KONtx.mediaplayer.getDefaultViewportBounds();	KONtx.mediaplayer.setViewportBounds(bounds);	KONtx.mediaplayer.playlist.set(playlist);	KONtx.mediaplayer.setConnectionBandwidth(KONtx.messages.fetch("bandwidth") || 1);	KONtx.mediaplayer.playlist.start();	} else if(this.readyState == 4 && this.status != 200){	KONtx.application.setNetworkRequestFailed(true);	log("FAILED GETTING PREROLL $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4");}
    

I've tried a few things so far:
  1. If I switch the order where the content goes first and then the preroll second, the content plays to the end of the VOD and then the TV crashes when it tries to play the preroll. 
  2. I tried parsing the XML in the custom playlist class but that didn't seem to work, even in the simulator.
  3. I switched out the content that is parsed from the ad XML with a longer video I know works and I actually get something to play but it still crashes right after so it could be the length of the content.
  4. I asked to have the prerolls re-encoded to match the VOD content but still nothing comes up on the TV

Any information would help me GREATLY since this is the last piece of the puzzle. 


Thank you.

3 Replies

  • Lets try that again without the code blocks


    I am having trouble showing prerolls before our VOD's on a Vizio M221NV. I'm getting a black screen whenever it tries to play a preroll around 15 seconds long. The UI is still fully functional and I can navigate around my fullscreen view perfectly fine but nothing ever gets played. In the simulator, the preroll works perfectly fine and everything works as it's suppose to so this seemes to be a TV only error.

    I'm 
    using the Fast Expiring Content example from the docs and from another post here in the forums to account for the very short length. Here is my custom playlist class ( I don't see an option where I can post code blocks so excuse me if it comes up as plain text ).

    var CustomPlaylistEntry = new KONtx.Class({  Extends: KONtx.media.PlaylistEntry,  config: {    adClips: null  },    initialize: function() {    this.parent();    this._urlsFetched = false;  },    streamsReady: function(callback) {    if(!this._urlsFetched) {      this._fetchContentURLs(callback);      return false;    } else {      return true;    }    },  _fetchContentURLs: function(callback) {  	for(var i=0;i&lt;this.config.adClips.length;i++){    		this.addURL(this.config.adClips[i].url, this.config.adClips[i].bitrate);    	}    this._urlsFetched = true;     callback();  }  });
    I'm given the preroll URL in multiple bitrates so I needed to add multiple streams to my Playlist entry. 


    Here is how I am creating the playlist entries; all my playlists will only be two items long (a preroll before VOD):

    if(this.readyState == 4 && this.status == 200){		var vast = XMLDOM.parse(this.responseXML.toXML());	var imp = vast.getElementsByTagName("Impression");	var data = {		pixels : [],		clips : []	};	for(var i=0;i<imp.length;i++){		var c = imp.item(i);		var px = c.firstChild.data;		var img = new KONtx.element.Image({			src: px.trim().clean(),			styles:{				height:1,				width: 1			}		});	}	var media = vast.getElementsByTagName("MediaFile");	for(var j=0;j<media.length;j++){		var c = media.item(j);		var url1 = c.firstChild.data;		url1 = url1.trim().clean();		var bitrate1 = c.getAttribute("bitrate");		data.clips.push({url:url1, bitrate:bitrate1});	}	var playlist = new KONtx.media.Playlist();	playlist.addEntry(new CustomPlaylistEntry({adClips: data.clips}));	playlist.addEntry(new KONtx.media.PlaylistEntry({streams: np.video}));	callback(playlist);	log("#######!@#!@#!!!!!! - "+ $dump(data.clips));	log("#######!@#!@#!!!!!! - "+ $dump(np.video));	
       var bounds = KONtx.mediaplayer.getDefaultViewportBounds();
    	KONtx.mediaplayer.setViewportBounds(bounds);	KONtx.mediaplayer.playlist.set(playlist);	KONtx.mediaplayer.setConnectionBandwidth(KONtx.messages.fetch("bandwidth") || 1);	KONtx.mediaplayer.playlist.start();	} else if(this.readyState == 4 && this.status != 200){	KONtx.application.setNetworkRequestFailed(true);	log("FAILED GETTING PREROLL $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4");}
    I've tried a few things so far:
    1. If I switch the order where the content goes first and then the preroll second, the content plays to the end of the VOD and then the TV crashes when it tries to play the preroll. 
    2. I tried parsing the XML in the custom playlist class but that didn't seem to work, even in the simulator.
    3. I switched out the content that is parsed from the ad XML with a longer video I know works and I actually get something to play but it still crashes right after so it could be the length of the content.
    4. I asked to have the prerolls re-encoded to match the VOD content but still nothing comes up on the TV

    Any information would help me GREATLY since this is the last piece of the puzzle. 
    0
  • SORRY!!

    I am having trouble showing prerolls before our VOD's on a Vizio M221NV. I'm getting a black screen whenever it tries to play a preroll around 15 seconds long. The UI is still fully functional and I can navigate around my fullscreen view perfectly fine but nothing ever gets played. In the simulator, the preroll works perfectly fine and everything works as it's suppose to so this seemes to be a TV only error.
    I'm using the Fast Expiring Content example from the docs and from another post here in the forums to account for the very short length. Here is my custom playlist class ( I don't see an option where I can post code blocks so excuse me if it comes up as plain text ).
    var CustomPlaylistEntry = new KONtx.Class({
        Extends: KONtx.media.PlaylistEntry,
        config: {
            adClips: null
        },   
        initialize: function() {
            this.parent();
            this._urlsFetched = false;
        },   
        streamsReady: function(callback) {
            if(!this._urlsFetched) {
                this._fetchContentURLs(callback);
                return false;
            } else {
                return true;
            }    
        },
        _fetchContentURLs: function(callback) {
            for(var i=0;i<this.config.adClips.length;i++){
            this.addURL(this.config.adClips[i].url, this.config.adClips[i].bitrate);
                }
            this._urlsFetched = true; 
            callback();
        }    
    });
    I'm given the preroll URL in multiple bitrates so I needed to add multiple streams to my Playlist entry. 

    Here is how I am creating the playlist entries; all my playlists will only be two items long (a preroll before VOD):
    if(this.readyState == 4 && this.status == 200){    
        var vast = XMLDOM.parse(this.responseXML.toXML());
        var imp = vast.getElementsByTagName("Impression");
        var data = {
    pixels : [],
    clips : []
        };
        for(var i=0;i<imp.length;i++){
    var c = imp.item(i);
    var px = c.firstChild.data;
    var img = new KONtx.element.Image({
    src: px.trim().clean(),
    styles:{
    height:1,
    width: 1
    }
    });
        }
        var media = vast.getElementsByTagName("MediaFile");
        for(var j=0;j<media.length;j++){
    var c = media.item(j);
    var url1 = c.firstChild.data;
    url1 = url1.trim().clean();
    var bitrate1 = c.getAttribute("bitrate");
    data.clips.push({url:url1, bitrate:bitrate1});
        }
        var playlist = new KONtx.media.Playlist();
        playlist.addEntry(new CustomPlaylistEntry({adClips: data.clips}));
        playlist.addEntry(new KONtx.media.PlaylistEntry({streams: np.video}));
        callback(playlist);
        log("#######!@#!@#!!!!!! - "+ $dump(data.clips));
        log("#######!@#!@#!!!!!! - "+ $dump(np.video));
        
       var bounds = KONtx.mediaplayer.getDefaultViewportBounds();
        KONtx.mediaplayer.setViewportBounds(bounds);
        KONtx.mediaplayer.playlist.set(playlist);
        KONtx.mediaplayer.setConnectionBandwidth(KONtx.messages.fetch("bandwidth") || 1);
        KONtx.mediaplayer.playlist.start();
        
    } else if(this.readyState == 4 && this.status != 200){
        KONtx.application.setNetworkRequestFailed(true);
        log("FAILED GETTING PREROLL $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4");
    }

    I've tried a few things so far:
    1. If I switch the order where the content goes first and then the preroll second, the content plays to the end of the VOD and then the TV crashes when it tries to play the preroll. 
    2. I tried parsing the XML in the custom playlist class but that didn't seem to work, even in the simulator.
    3. I switched out the content that is parsed from the ad XML with a longer video I know works and I actually get something to play but it still crashes right after so it could be the length of the content.
    4. I asked to have the prerolls re-encoded to match the VOD content but still nothing comes up on the TV

    Any information would help me GREATLY since this is the last piece of the puzzle. 
    0
  • Can you tell me the versions of framework, engine and the make of the TV where you tested this? Also give me the preroll URL and the video URL so that I can test it over here.

    Thanks,
    Vivek
    0

Recent Posts

in General - Yahoo! TV Widgets