PageSourceSearch

https://members-cdn.schiffsovereign.com/wp-content/themes/sovereignman/js/mejs_plugins.js?ver=7.0.6

js schiffsovereign.com collected 2026-10-02 03:39:49 UTC 4,767 bytes, 136 lines download raw bytes

1(function($) {
2	_wpmejsSettings.features = ['playpause','stepback','stepforward','current','progress','remaining','smspeed', 'volume'];
3	_wpmejsSettings.audioWidth = '100%';
4	_wpmejsSettings.audioHeight = 41;
5
6	$.extend(mejs.MepDefaults, {
7
8		speeds: ['2', '1.50', '1.25', '1', '0.75'],
9
10		defaultSpeed: '1',
11
12		speedChar: 'x'
13
14	});
15	$.extend(MediaElementPlayer.prototype, {
16
17		buildsmspeed: function(player, controls, layers, media) {
18			var t = this;
19
20			if (t.media.pluginType == 'native') {
21				var
22					speedButton = null,
23					speedSelector = null,
24					playbackSpeed = null,
25					inputId = null,
26					html = '<div class="mejs-button mejs-speed-button">' +
27						'<button type="button">' + t.options.defaultSpeed + t.options.speedChar + '</button>' +
28						'<div class="mejs-speed-selector">' +
29						'<ul>';
30
31				if ($.inArray(t.options.defaultSpeed, t.options.speeds) === -1) {
32					t.options.speeds.push(t.options.defaultSpeed);
33				}
34
35				t.options.speeds.sort(function(a, b) {
36					return parseFloat(b) - parseFloat(a);
37				});
38
39				for (var i = 0, il = t.options.speeds.length; i<il; i++) {
40					inputId = t.id + '-speed-' + t.options.speeds[i];
41					html += '<li>' +
42					'<input type="radio" name="speed" ' +
43					'value="' + t.options.speeds[i] + '" ' +
44					'id="' + inputId + '" ' +
45					(t.options.speeds[i] == t.options.defaultSpeed ? ' checked' : '') +
46					' />' +
47					'<label for="' + inputId + '" ' +
48					(t.options.speeds[i] == t.options.defaultSpeed ? ' class="mejs-speed-selected"' : '') +
49					'>' + t.options.speeds[i] + t.options.speedChar + '</label>' +
50					'</li>';
51				}
52				html += '</ul></div></div>';
53
54				speedButton = $(html).appendTo(controls);
55				speedSelector = speedButton.find('.mejs-speed-selector');
56
57				playbackspeed = t.options.defaultSpeed;
58
59				speedSelector
60					.on('click', 'input[type="radio"]', function() {
61						var newSpeed = $(this).attr('value');
62						playbackspeed = newSpeed;
63						media.playbackRate = parseFloat(newSpeed);
64						speedButton.find('button').html(newSpeed + t.options.speedChar);
65						speedButton.find('.mejs-speed-selected').removeClass('mejs-speed-selected');
66						speedButton.find('input[type="radio"]:checked').next().addClass('mejs-speed-selected');
67					});
68
69				speedSelector
70					.height(
71					speedButton.find('.mejs-speed-selector ul').outerHeight(true) +
72					speedButton.find('.mejs-speed-translations').outerHeight(true))
73					.css('top', (-1 * speedSelector.height()) + 'px');
74			}
75		}
76	});
77	$.extend(MediaElementPlayer.prototype, {
78		buildstepback: function(player, controls, layers, media) {
79			var
80				t = this,
81			// create the loop button
82				el =
83					$('<div href="#" class="mejs-button mejs-stepback-button"><button>Back</button></div>')
84						// append it to the toolbar
85						.appendTo(controls)
86						// add a click toggle event
87						.find('button')
88						.click(function(e) {
89							e.preventDefault();
90							e.stopPropagation();
91							media.setCurrentTime(media.currentTime - 30);
92						});
93		},
94		buildstepforward: function(player, controls, layers, media) {
95			var
96				t = this,
97			// create the loop button
98				el =
99					$('<div href="#" class="mejs-button mejs-stepforward-button"><button>Forward</button></div>')
100						// append it to the toolbar
101						.appendTo(controls)
102						// add a click toggle event
103						.find('button')
104						.click(function(e) {
105							e.preventDefault();
106							e.stopPropagation();
107							media.setCurrentTime(media.currentTime + 30);
108						});
109		},
110		buildremaining: function (player, controls, layers, media) {
111			var t = this,
112				el = $('<div class="mejs-time mejs-remaining-container">'+
113				'<span class="mejs-remaining">' +
114				(t.options.duration > 0 ?
115					mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount,  t.options.framesPerSecond || 25) :
116					((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00'))
117				) +
118				'</span>' +
119				'</div>').appendTo(controls);
120			media.addEventListener('timeupdate',function() {
121				player.updateRemaining();
122			}, false);
123			t.remainingD = t.controls.find('.mejs-remaining');
124		},
125		updateRemaining: function() {
126			var t = this;
127
128			//Toggle the long video class if the video is longer than an hour.
129			t.container.toggleClass("mejs-long-video", t.media.duration > 3600);
130
131			if (t.remainingD && (t.options.duration > 0 || (t.media.duration - t.media.currentTime))) {
132				t.remainingD.html(mejs.Utility.secondsToTimeCode(t.options.duration > 0 ? t.options.duration : (t.media.duration - t.media.currentTime), t.options.alwaysShowHours, t.options.showTimeco
132deFrameCount, t.options.framesPerSecond || 25));
133			}
134		}
135	});
136})(mejs.$);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.