PageSourceSearch

https://truasiacompliance.stc.group/apps/files_videoplayer/js/viewer.js?v=63a85e9fef19baeb6bbcc24c6e582808

js stc.group collected 2026-10-04 07:49:02 UTC 2,880 bytes, 92 lines download raw bytes

1var videoViewer = {
2	UI : {
3		playerTemplate : '<header><link href="'+OC.filePath('files_videoplayer', 'videojs', 'src')+'/video-js.css" rel="stylesheet"><script src="'+OC.filePath('files_videoplayer', 'videojs', 'src')+'/video.js"></script>' +
4		'</header><video id="my_video_1" class="video-js vjs-sublime-skin" controls preload="auto" width="100%" height="100%" poster="'+OC.filePath('files_videoplayer', '', 'img')+'/poster.png" data-setup=\'{"techOrder": ["html5"]}\'>' +
5		'<source type="%type%" src="%src%" />' +
6		'</video>',
7		show : function () {
8			// insert HTML
9			$('<div id="videoplayer_overlay" style="display:none;"><div id="videoplayer_outer_container"><div id="videoplayer_container"><div id="videoplayer"></div></div></div></div>').appendTo('body');
10			var playerView = videoViewer.UI.playerTemplate
11								.replace(/%type%/g, escapeHTML(videoViewer.mime))
12								.replace(/%src%/g, escapeHTML(videoViewer.location))
13			;
14			$(playerView).prependTo('#videoplayer');
15			// add event to overlay
16			$("#videoplayer_overlay").on("click", function(e) {
17				if (e.target != this) {
18					return;
19				} else {
20					videoViewer.hidePlayer();
21				}
22			});
23			// show elements
24			$('#videoplayer_overlay').fadeIn('fast');
25			// initialize player
26			var vjsPlayer = videojs("my_video_1");
27			// append close button to video element
28			$("#my_video_1").append('<a class="icon-view-close" id="box-close" href="#"></a>');
29			// add event to close button
30			$('#box-close').click(videoViewer.hidePlayer);
31			// autoplay
32			vjsPlayer.play();
33		},
34		hide : function() {
35			$('#videoplayer_overlay').fadeOut('fast', function() {
36				$('#videoplayer_overlay').remove();
37			});
38		}
39	},
40	mime : null,
41	file : null,
42	location : null,
43	player : null,
44	mimeTypes : [
45		'video/mp4',
46		'video/webm',
47		'video/x-flv',
48		'video/ogg',
49		'video/quicktime'
50	],
51	onView : function(file, data) {
52		videoViewer.file = file;
53		videoViewer.dir = data.dir;
54		videoViewer.location = data.fileList.getDownloadUrl(file, videoViewer.dir);
55		videoViewer.mime = data.$file.attr('data-mime');
56		videoViewer.showPlayer();
57	},
58	showPlayer : function() {
59		videoViewer.UI.show();
60	},
61	hidePlayer : function() {
62		videoViewer.player = false;
63		delete videoViewer.player;
64		videoViewer.UI.hide();
65		// force close socket
66		$('video').each(function() {
67		    $($(this)[0]).attr('src', '');
68		});
69	},
70	log : function(message){
71		console.log(message);
72	}
73};
74
75$(document).ready(function(){
76
77	// add event to ESC key
78	$(document).keyup(function(e) {
79		if (e.keyCode === 27) {
80			videoViewer.hidePlayer();
81		}
82	});
83
84	if (typeof FileActions !== 'undefined') {
85		for (var i = 0; i < videoViewer.mimeTypes.length; ++i) {
86			var mime = videoViewer.mimeTypes[i];
87			OCA.Files.fileActions.register(mime, 'View', OC.PERMISSION_READ, '', videoViewer.onView);
88			OCA.Files.fileActions.setDefault(mime, 'View');
89		}
90	}
91
92});

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.