javascript - Video not resuming/Jumping in time not working -


another question video-coding.

so have been trying work videos in webapplication, has been far. here's problem, video i'm playing local file. whenever pause video or jump specific time, video player disables itself. works when hit 'play' again, causes video 'reload'. when hit 'play' once more, video starts again beginning.

this annoying , have no idea causing behave that. chrome, because firefox not bug in way, resuming works , on.

the code below simple video-player html5

        <style type="text/css">             .easyhtml5video span {                 display: none;             }         </style>         <div class="easyhtml5video" style="position: relative; max-width: 854px; max-height: 510px;">             <video controls="controls" autoplay="autoplay" runat="server" id="video" preload="none" style="width: 100%">                 <source runat="server" id="mp4" type="video/mp4" />                 <source runat="server" id="webm" type="video/webm" />             </video>         </div>         <script src="vidsrc/html5video/html5ext.js" type="text/javascript"></script> 

the script-code:

(function () { function j(t, s, i) {     if (t.addeventlistener) {         t.addeventlistener(s, i, false)     } else {         t.attachevent("on" + s, i)     } }  function r(t, s, i) {     if (t.removeeventlistener) {         t.removeeventlistener(s, i)     } else {         t.detachevent("on" + s, i)     } }  function o(u, t) {     if (!u.length) {         u = [u]     }     (var v in t) {         (var s = 0; s < u.length; s++) {             u[s].style[v] = t[v]         }     } }  function m(t, v) {     v = v || document;     if (document.getelementsbyclassname) {         return v.getelementsbyclassname(t)     }     var w = v.getelementsbytagname("*"),         s = [];     (var u = 0; u < w.length; u++) {         if ((new regexp("(^|\\s+)" + t + "(\\s+|$)", "g")).test(w[u].classname)) {             s.push(w[u]);             break         }     }     return s } var h = 0,     n = ""; if (typeof document.cancelfullscreen != "undefined") {     h = true } else {     var e = "webkit moz o ms khtml".split(" ");     (var f = 0, l = e.length; f < l; f++) {         n = e[f];         if (typeof document[n + "cancelfullscreen"] != "undefined") {             h = true;             break         }     } }  function g(i) {     if (h) {         switch (n) {         case "":             return document.fullscreen;         case "webkit":             return document.webkitisfullscreen;         default:             return document[n + "fullscreen"]         }     } else {         return !!i.eh5v     } } var k = 0;  function c(i) {     if (h) {         return (n === "") ? i.requestfullscreen() : i[n + "requestfullscreen"]()     } else {         if (!i) {             return         }         if (k) {             d(k)         }         var t = {             position: "fixed",             left: 0,             top: 0,             right: "auto",             bottom: "auto",             width: window.innerwidth + "px",             height: window.innerheight + "px",             backgroundcolor: "rgba(0,0,0,0.9)",             border: "none",             zindex: 9999999         };         i.eh5v = {};         (var s in t) {             i.eh5v[s] = i.style[s]         }         (var s in t) {             i.style[s] = t[s]         }         j(document.body, "keydown", p);         k =     } }  function d(i) {     if (h) {         return (n === "") ? document.cancelfullscreen() : document[n + "cancelfullscreen"]()     } else {         if (!i) {             return         }         (var s in i.eh5v) {             i.style[s] = i.eh5v[s]         }         i.eh5v = 0;         r(document.body, "keydown", p);         k = 0     } }  function p(i) {     if (i.keycode == 27) {         d(k)     } } var q;  function a(t, h) {     var u = t.getelementsbytagname("video")[0];     if (u) {         if (/(ipad|iphone|ipod)/ig.test(navigator.useragent)) {             var = new image();             a.style.visibility = "hidden";             a.src = u.poster;             t.appendchild(a);             u.style.position = "absolute";             u.style.height = "100%"         }         if (u.eh5v) {             return         }         u.eh5v = {             fullscreen: function (i) {                 if (i) {                     c(u)                 } else {                     if (g(u)) {                         d(u)                     }                 }                 return g(u)             }         };         var b;         if (!h.nofs && u.getattribute("controls") && (window.opera || /msie/.test(navigator.useragent) || navigator.mozvibrate)) {             var g = /(.*\/)[^\/]+/.exec(u.poster)[1] + "fullscreen.png";             if (!q) {                 q = new image();                 q.src = g             }             b = document.createelement("div");             o(b, {                 position: "absolute",                 zindex: 10,                 display: "none",                 right: "0px",                 top: "0px",                 width: "28px",                 height: "28px",                 background: 'rgba(0,0,0,0.50) url("' + g + '") 50% 50% no-repeat',                 border: "none"             });             u.parentnode.appendchild(b);              function c() {                 b.style.display = "none"             }             j(u, "mouseover", function () {                 b.style.display = "block"             });             j(u, "mouseout", function () {                 c()             });             j(b, "mouseover", function () {                 b.style.display = "block"             });             j(b, "click", function () {                 c(u);                 c()             })         }         j(u, "dblclick", function () {             if (g(u)) {                 d(u)             } else {                 c(u)             } if (b) {                 settimeout(c, 100)             }         });         if (!u.getattribute("loop")) {             j(u, "ended", function () {                 settimeout(function () {                     u.load();                     u.pause()                 }, 400)             })         }         if (/android/.test(navigator.useragent)) {             var w = u.getelementsbytagname("source"),                 d;             (var z = w.length - 1; z >= 0; z--) {                 if (!w[z].type) {                     d = w[z].src                 } else {                     if (d && /mp4/.test(w[z].type)) {                         w[z].src = d;                         u.load()                     }                 }             }         }         var x = document.createelement("ul"),             f = {                 pause: {                     label: "pause",                     click: function () {                         u.pause()                     }                 },                 play: {                     label: "play",                     click: function () {                         u.play()                     }                 },                 mute: {                     label: "mute",                     click: function () {                         u.muted = true                     }                 },                 unmute: {                     label: "unmute",                     click: function () {                         u.muted = false                     }                 }             };         o(x, {             position: "fixed",             display: "none",             liststyletype: "none",             margin: "0px",             padding: "0px",             background: "#fff",             cursor: "pointer",             zindex: 2147483647,             webkitboxshadow: "2px 2px 10px #313131",             mozboxshadow: "2px 2px 10px #313131",             boxshadow: "2px 2px 10px #313131"         });         j(x, "contextmenu", function (i) {             i.preventdefault()         });          function y() {             x.style.display = "none"         }         j(x, "click", y);         j(window, "scroll", y);         j(document, "click", y);         j(document, "contextmenu", y);         (var v in f) {             var s = document.createelement("li");             o(s, {                 margin: "0px",                 padding: "3px 20px"             });             s.innerhtml = f[v].label;             x.appendchild(s);             j(s, "click", f[v].click);             j(s, "mouseover", function () {                 o(this, {                     backgroundcolor: "#4281f4",                     color: "#fff"                 })             });             j(s, "mouseleave", function () {                 o(this, {                     backgroundcolor: "transparent",                     color: "#000"                 })             });             f[v].item = s         }         t.appendchild(x);         j(u, "contextmenu", function (i) {             o(x, {                 left: i.pagex + "px",                 top: i.pagey + "px",                 display: "block"             });             i.preventdefault();             i.stoppropagation()         });          function e() {             f.unmute.item.style.display = u.muted ? "block" : "none";             f.mute.item.style.display = u.muted ? "none" : "block";             f.play.item.style.display = u.paused ? "block" : "none";             f.pause.item.style.display = u.paused ? "none" : "block"         }         j(window, "load", e);         j(u, "pause", e);         j(u, "play", e);         j(u, "volumechange", e)     } } var b = m("easyhtml5video"); (var f = 0; f < b.length; f++) {     a(b[f], {         nofs: 0     }) } })(); 

this script delivered html5 video converter. don't understand script, yeah.

my question is: how make sure video resumes , when jump specific time, video goes timestamp?

be warned, i'm newbie when comes programming , videos. have no experience @ ...


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -