ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/img.123vid.top/videojs/ |
// Generated by CoffeeScript 1.7.1 (function() { var segmentPlugin; segmentPlugin = function(options) { var Player, duration, end, index, segments, start; Player = this.constructor; Player.__super__ = { src: Player.prototype.src, currentTime: Player.prototype.currentTime, duration: Player.prototype.duration, bufferedPercent: Player.prototype.bufferedPercent }; index = start = end = duration = 0; segments = []; /* The source function updates the video source **Array of Source Segment Objects:** To provide multiple source segments so that it can be played like a single file. myPlayer.src([ { seconds: 300, src: "http://www.example.com/path/to/video1.mp4" }, { seconds: 100, src: "http://www.example.com/path/to/video2.mp4" }, { seconds: 400, src: "http://www.example.com/path/to/video3.mp4" } ]); */ return Player.prototype.src = function(source) { var seg, _i, _len, _ref; if (source instanceof Array && ((_ref = source[0]) != null ? _ref.seconds : void 0)) { segments = source; Player.prototype.currentTime = function(seconds) { if (seconds) { Player.__super__.currentTime.call(this, seconds - start); return this.segmentSeek(seconds); } else { return Player.__super__.currentTime.apply(this, arguments) + start; } }; Player.prototype.duration = function(seconds) { if (seconds) { seconds = duration; } return Player.__super__.duration.call(this, seconds); }; Player.prototype.bufferedPercent = function() { return Player.__super__.bufferedPercent.apply(this, arguments) + start / duration; }; Player.prototype.segmentSeek = function(seconds) { if (seconds < 0 || seconds > duration || seconds > start && seconds < end) { return; } index = start = 0; while (seconds >= start + segments[index].seconds) { start += segments[index].seconds; index++; } end = start + segments[index].seconds; this.src(segments[index].src); this.one('canplay', function() { if (this.currentTime() !== seconds) { return this.currentTime(seconds); } }); return this.play(); }; duration = 0; for (_i = 0, _len = segments.length; _i < _len; _i++) { seg = segments[_i]; duration += seg.seconds; } end = start + segments[index].seconds; this.on('ended', function() { if (index < segments.length - 1) { start = end; index++; end += segments[index].seconds; this.src(segments[index].src); return this.play(); } }); return Player.__super__.src.call(this, source[0].src); } else { return Player.__super__.src.apply(this, arguments); } }; }; window.videojs.plugin('segment', segmentPlugin); }).call(this);