PageSourceSearch

https://2022dbs.com/js/libs/videoplayer.js

js 2022dbs.com collected 2026-10-02 17:54:47 UTC 6,261 bytes, 246 lines download raw bytes

1if (
2  navigator.userAgent.indexOf("iPhone") > 0 ||
3  navigator.userAgent.indexOf("iPod") > 0 ||
4  (navigator.userAgent.indexOf("Android") > 0 && navigator.userAgent.indexOf("Mobile") > 0) ||
5  navigator.userAgent.indexOf("BlackBerry") > 0 ||
6  navigator.userAgent.indexOf("IEMobile") > 0
7) {
8  var spFlag = true;
9}
10
11function no_scroll() {
12  var a = "onwheel" in document ? "wheel" : "onmousewheel" in document ? "mousewheel" : "DOMMouseScroll";
13  $(document).on(a, function (b) {
14    b.preventDefault();
15  });
16  $(document).on("touchmove.noScroll", function (b) {
17    b.preventDefault();
18  });
19}
20
21function return_scroll() {
22  var a = "onwheel" in document ? "wheel" : "onmousewheel" in document ? "mousewheel" : "DOMMouseScroll";
23  $(document).off(a);
24  $(document).off(".noScroll");
25}
26var youtubeID = [
27  ["公開後PV", "A7GWuLQnDPY", "", "active"],
28  ["PR映像30秒 PART3", "rBJSax5HL_Q", "", ""],
29  ["PR映像30秒 PART2", "48qpf4H8ZO4", "", ""],
30  ["PR映像30秒 PART1", "PguuUmMwXM4", "", ""],
31];
32var autoplay = false;
33var firstFlag = true;
34var playno = 0;
35var maxyoutube = youtubeID.length - 1;
36var player = -1;
37var volmnum = 100;
38var ytcontrols = 0;
39var playrFlag = true;
40var videoStartF = false;
41var navi = "";
42for (var i = 0; i < youtubeID.length; i++) {
43  navi = navi + '<li class="yt_navi over ' + youtubeID[i][2] + " " + youtubeID[i][3] + '">' + youtubeID[i][0] + "</li>";
44}
45
46(function () {
47  var e;
48  var a = function () {};
49  a.prototype = {
50    init: function () {},
51    play: function (f) {
52      clearTimeout(e);
53      c(f);
54    },
55    close: function () {
56      $("#yt_fade").animate(
57        {
58          opacity: 0,
59        },
60        {
61          duration: 500,
62          easing: "linear",
63          complete: function () {
64            $("#yt_fade").remove();
65            return_scroll();
66          },
67        }
68      );
69    },
70  };
71
72  function d() {
73    $("#youtubeplayer").addClass("active");
74  }
75
76  function b() {
77    var f = document.getElementById("overSound");
78    $(".snd_start").click(function () {
79      if ($("#snd_btn").hasClass("sund_paused")) {
80        var g = jQuery.extend($("<div>")[0], {
81          volume: 0,
82        });
83        $(g)
84          .delay(600)
85          .animate(
86            {
87              volume: 0.5,
88            },
89            {
90              easing: "linear",
91              duration: 1500,
92              step: function () {
93                console.log(this.volume);
94                f.volume = this.volume;
95              },
96              complete: function () {
97                volume: 0.5;
98                $("#snd_btn").removeClass("sund_paused");
99                console.log(this.volume);
100              },
101            }
102          );
103      }
104    });
105  }
106
107  function c(f) {
108    //no_scroll();
109    ytcontrols = 1;
110    $("body").prepend(
111      '<div id="yt_fade"><div id="youtubeplayer"><div id="player"></div><ul id="youtube_navi">' +
112        navi +
113        '</ul></div><div class="close over"><a href="javascript:videoplayer.close();"><img src="img/common/close.png?id=1" alt=""></a></div></div>'
114      //'<div id="yt_fade"><div id="youtubeplayer"><div id="player"></div></div><div class="close over"><a href="javascript:videoplayer.close();"><img src="img/common/close.png?id=1" alt=""></a></div></div>'
115    );
116    b();
117    $("#yt_fade_box").animate(
118      {
119        opacity: 1,
120      },
121      {
122        duration: 400,
123      }
124    );
125    $("#yt_fade")
126      .delay(200)
127      .animate(
128        {
129          opacity: 1,
130        },
131        {
132          duration: 400,
133          complete: function () {
134            $("#youtubeplayer").addClass("active");
135            $("#yt_fade .close").addClass("active");
136            $("#yt_fade .close").addClass("over");
137            playno = f;
138            if (player != -1) {
139              onYouTubePlayerAPIReady();
140            } else {
141              tag = document.createElement("script");
142              tag.src = "https://www.youtube.com/iframe_api";
143              firstScriptTag = document.getElementsByTagName("script")[0];
144              done = false;
145              firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
146              playerF = true;
147            }
148            $("#youtube_navi .yt_navi").on("click", function () {
149              var index = $(".yt_navi").index(this);
150              video_change(index);
151            });
152          },
153        }
154      );
155  }
156  videoplayer = window.Videoplayer_Class = new a();
157})();
158
159function video_change(num) {
160  if (playno !== num) {
161    playno = num;
162    $("#player").remove();
163    $("#youtubeplayer").prepend('<div id="player"></div>');
164    $(".yt_navi").removeClass("active");
165    $(".yt_navi").eq(num).addClass("active");
166    if (player != -1) {
167      onYouTubePlayerAPIReady();
168    } else {
169      tag = document.createElement("script");
170      tag.src = "https://www.youtube.com/iframe_api";
171      firstScriptTag = document.getElementsByTagName("script")[0];
172      done = false;
173      firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
174      playerF = true;
175    }
176  } else {
177    return false;
178  }
179}
180
181function onYouTubePlayerAPIReady() {
182  player = new YT.Player("player", {
183    height: "560",
184    width: "1000",
185    videoId: youtubeID[playno][1],
186    playerVars: {
187      autoplay: 0,
188      rel: 0,
189      controls: 1,
190      showinfo: 1,
191      vq: "hd720",
192    },
193    events: {
194      //'onReady': onPlayerReady,
195      onStateChange: onPlayerStateChange,
196    },
197  });
198}
199
200function onPlayerReady(a) {
201  if (!spFlag) {
202    a.target.playVideo();
203  }
204  player.setPlaybackQuality("hd720");
205  player.setVolume(volmnum);
206}
207
208function onPlayerStateChange(a) {
209  if (a.data == YT.PlayerState.PLAYING) {
210    if (firstFlag) {
211      $("#fade2").animate(
212        {
213          opacity: 0,
214        },
215        {
216          duration: 500,
217        }
218      );
219    }
220    $("#player").css({
221      opacity: 1,
222    });
223  }
224  if (a.data == YT.PlayerState.ENDED) {
225    if (autoplay) {
226      player.pauseVideo();
227      if (playno < maxyoutube) {
228        playno++;
229        videoplayer.change(playno);
230      } else {
231        playno = 0;
232        videoplayer.change(playno);
233      }
234    } else {
235      return false;
236    }
237  }
238}
239
240function pauseVideo() {
241  player.pauseVideo();
242}
243
244function stopVideo() {
245  player.stopVideo();
246}

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.