Guest User

Untitled

a guest
Sep 29th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. "jwplayer6":{
  2. match:function(obj) {
  3. return (typeof obj.jwGetPlaylist==='function'
  4. || null);
  5. },
  6. asset:function(obj,match,context) {
  7. var item, pl = obj.jwGetPlaylist();
  8. item = pl[0];
  9. var rv = {"html":obj,"primary_type":'video',"sources":{}},
  10. width = obj.jwGetWidth(),
  11. height = obj.jwGetHeight();
  12. if ( /^rtmp:/.test(item.file) ) {
  13. var newfile = item.file.replace('vod/mp4:', 'vod//mp4:
  14. ');
  15. rv.sources["video_rtmp"] = newfile;
  16. rv.primary_type = "video_rtmp";
  17. }
  18. rv.sources[rv.primary_type+'-metadata'] = "w"+width+"h"+height;
  19. if (item.image) {
  20. rv.sources['thumb'] = SherdBookmarklet.absolute_url(item.image, context.document);
  21. }
  22. if (item.title) {
  23. rv.sources["title"] = item.title;
  24. } else rv.sources["title"] = document.title;
  25. return rv;
  26. }
  27. },
Advertisement
Add Comment
Please, Sign In to add comment