Renamed H264 player to Adaptive Player
authorveltr
Tue, 02 Oct 2012 12:44:37 +0200
changeset 968 03c88ba5de2c
parent 967 b4c6e64acb2d
child 969 353b0881a0b9
Renamed H264 player to Adaptive Player
src/widgets/AdaptivePlayer.js
src/widgets/H264Player.js
test/mp4video.htm
test/oggvideo.htm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/widgets/AdaptivePlayer.js	Tue Oct 02 12:44:37 2012 +0200
@@ -0,0 +1,33 @@
+IriSP.Widgets.AdaptivePlayer = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+};
+
+IriSP.Widgets.AdaptivePlayer.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.AdaptivePlayer.prototype.defaults = {
+    mime_type: "video/mp4",
+    normal_player: "PopcornPlayer",
+    fallback_player: "JwpPlayer"
+}
+
+IriSP.Widgets.AdaptivePlayer.prototype.draw = function() {
+    
+    if (typeof this.video === "undefined") {
+        this.video = this.media.video;
+    }
+    
+    var _props = [ "autostart", "video", "height", "width", "url_transform" ],
+        _opts = {},
+        _canPlayType = document.createElement('video').canPlayType(this.mime_type);
+    
+    _opts.type = (_canPlayType == "maybe" || _canPlayType == "probably") ? this.normal_player : this.fallback_player;
+    
+    for (var i = 0; i < _props.length; i++) {
+        if (typeof this[_props[i]] !== "undefined") {
+            _opts[_props[i]] = this[_props[i]];
+        }
+    }
+
+    this.insertSubwidget(this.$, _opts);
+    
+}
\ No newline at end of file
--- a/src/widgets/H264Player.js	Tue Oct 02 12:05:15 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-IriSP.Widgets.H264Player = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.H264Player.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.H264Player.prototype.defaults = {
-    mime_type: "video/mp4",
-    normal_player: "PopcornPlayer",
-    fallback_player: "JwpPlayer"
-}
-
-IriSP.Widgets.H264Player.prototype.draw = function() {
-    
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-    
-    var _props = [ "autostart", "video", "height", "width", "url_transform" ],
-        _opts = {},
-        _canPlayType = document.createElement('video').canPlayType(this.mime_type);
-    
-    _opts.type = (_canPlayType == "maybe" || _canPlayType == "probably") ? this.normal_player : this.fallback_player;
-    
-    for (var i = 0; i < _props.length; i++) {
-        if (typeof this[_props[i]] !== "undefined") {
-            _opts[_props[i]] = this[_props[i]];
-        }
-    }
-
-    this.insertSubwidget(this.$, _opts);
-    
-}
\ No newline at end of file
--- a/test/mp4video.htm	Tue Oct 02 12:05:15 2012 +0200
+++ b/test/mp4video.htm	Tue Oct 02 12:44:37 2012 +0200
@@ -30,7 +30,7 @@
     css : 'metadataplayer/LdtPlayer-core.css',
     widgets: [
         {
-            type: "H264Player",
+            type: "AdaptivePlayer",
             video: "trailer.mp4"
         },
         { type: "Sparkline" },
--- a/test/oggvideo.htm	Tue Oct 02 12:05:15 2012 +0200
+++ b/test/oggvideo.htm	Tue Oct 02 12:44:37 2012 +0200
@@ -29,10 +29,7 @@
     },
     css : 'metadataplayer/LdtPlayer-core.css',
     widgets: [
-        {
-            type: "PopcornPlayer",
-            autostart: true
-        },
+        { type: "PopcornPlayer" },
         { type: "Sparkline" },
         { type: "Slider" },
         { type: "Controller" },