PageSourceSearch

https://www.psl.co.za/Scripts/video.js

js psl.co.za collected 2026-09-24 23:34:51 UTC 4,588 bytes, 191 lines download raw bytes

1$(document).ready(function () {
2
3    load();
4    var videoId = $("#auto-play-video-id").val();
5    if (videoId != undefined) {
6        $.ajax(
7           {
8               url: "/videos/player/",
9               type: 'GET',
10               data: { id: videoId, relatedVideos:false }
11           }).success(function (result) {
12
13               $("#videoPlayer").html(result)
14               $("#videoPlayer").modal("show");
15           });
16    }
17
18    loadEmbeddedVideo();
19});
20
21
22$(document).on("change", "#Video_Tournaments", function (e) {
23    e.preventDefault();
24
25    var selectedValue = $(this).val()
26
27    $.ajax(
28       {
29           async: true,
30           url: "/videos/videolist/",
31           type: 'GET',
32           data: { tournament: selectedValue }
33       }).success(function (result) {
34
35           if (result.success == false) {
36               $("#VideoList-Partial").html(result.error)
37           }
38           else {
39               $("#VideoList-Partial").html(result)
40               load();
41           };
42       })
43
44});
45
46function load() {
47
48    var divs = $("#VideoList-Partial").children(".col-sm-3");
49    var visibleDivs = divs.filter(":visible");
50
51    for (i = 0; i < divs.length; i++) {
52        var div = $("#VideoList-Partial_" + i);
53
54        if (div != undefined) {
55
56            if (i <= 15) {
57                div.show();
58            }
59        }
60    }
61    if (divs.length > visibleDivs.length)
62        $("#div-load-more-videos").show()
63
64    if (divs.length == 0) {
65        $("#div-load-more-videos").hide()
66    }
67}
68
69
70function loadmorevideos() {
71    var divs = $("#VideoList-Partial").children(".col-sm-3");
72
73    var visibleDivs = divs.filter(":visible");
74
75    var counter = visibleDivs.length;
76
77    var max = (counter + 11);
78
79    for (i = counter; i <= max; i++) {
80        var div = $("#VideoList-Partial_" + i);
81
82        if (div != undefined) {
83            div.show();
84        }
85    }
86
87    if (divs.length == visibleDivs.length)
88        $("#div-load-more-videos").hide()
89    return false;
90}
91
92function playvideo(videoId)
93{
94    var playingvideoId = $("#playingvideoId").text();
95
96    if (videoId != playingvideoId)
97    {
98        $("#playingvideoId").text(videoId);
99
100        $.ajax(
101           {
102               url: "/videos/video/",
103               type: 'GET',
104               data: { id: videoId }
105           }).success(function (result) {
106
107               $("#modal-title").text(result.ShortName)
108
109               var config =
110               {
111                   url: result.VideoUrl,
112                   image: result.FeatureImage,
113                   player: 'jwplayer',
114                   skin: 'supersport',
115                   autoStart: true,
116                   live: false
117               };
118               initDstvMultiDrmPlayer('player', config);
119           })
120
121        $('#related-videos-list li').removeClass('active');
122        $('#related-videos-list-id-' + videoId).closest('li').addClass("active");
123    }
124    return false;
125}
126
127
128
129$(document).on("click", ".videoPlayer", function (e) {
130    e.preventDefault();
131
132    var videoId = $(this).attr("data-videoid")
133
134    var playingvideoId = $("#playingvideoId").text();
135
136    if (videoId != playingvideoId)
137    {
138        $("#playingvideoId").text(videoId);
139
140        var displayRelatedVideos = $(this).attr("data-show-related-videos")
141        $.ajax(
142           {
143               url: "/videos/player/",
144               type: 'GET',
145               data: { id: videoId, relatedVideos: displayRelatedVideos }
146           }).success(function (result) {
147               $("#videoPlayer").html(result)
148               $("#videoPlayer").modal("show");
149           });
150        return false;
151    }
152});
153
154$(document).on("click", "#closebutton", function (e) {
155    $("#videoPlayer").html("")
156    $("#playingvideoId").text("");
157})
158
159
160$(document).on('hide', '#videoPlayer', function ()
161{
162    $("#videoPlayer").html("")
163    $("#playingvideoId").text("");
164}).on('hidden', function () {
165    $("#videoPlayer").html("")
166    $("#playingvideoId").text("");
167});
168
169
170
171
172function loadEmbeddedVideo()
173{
174    var videoId = $("#EmbeddedVideoId").val();
175
176    if (videoId!=undefined )
177    {
178        $.ajax(
179           {
180               url: "/videos/EmbeddedVideo/",
181               type: 'GET',
182               data: { id: videoId }
183           }).success(function (result)
184           {
185
186               $("#EmbeddedVideoIdDiv").html(result)
187           });
188
189    }
190    return false;
191}

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.