carousel.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <div class="my-4 carousel-wrapper">
  2. <div class="swiper carousel">
  3. <div class="swiper-wrapper">
  4. <!-- <div class="swiper-slide">
  5. <div class="toggle-video">
  6. <select onchange="setEwinFrame(this)">
  7. <option value="">切換主題</option>
  8. <option value="0922">0922 杭州亞運開跑</option>
  9. <option value="0927">0927 跆拳道表現亮眼</option>
  10. </select>
  11. </div>
  12. <div class="wrapper">
  13. <img src="/imgs/home/底圖-07.png"
  14. alt="ChoozMo|AI主播|AI|華視|華視團隊前進杭州 AI主播E-Win越洋連線|杭州亞運開跑|人工智慧|AI人工智慧|人工智能|虛擬主播|虛擬人|新聞播報">
  15. <div class="video-wrapper e-win">
  16. <iframe id="yt_ewin_frame" src="https://www.youtube.com/embed/YvmyRn6e9uw?autoplay=1&mute=1"
  17. title="YouTube video player" frameborder="0"
  18. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  19. allowfullscreen></iframe>
  20. </div>
  21. </div>
  22. </div> -->
  23. <div class="swiper-slide">
  24. <a href="https://cmm.ai/taipei101/#/" target="_blank">
  25. <img src="/imgs/home/101_AI_Avatar.webp" alt="101|ChoozMo|AI主播|AI|AI Avatar|AI智能客服|AI人工智慧|人工智能|人工智慧|虛擬人">
  26. </a>
  27. </div>
  28. <div class="swiper-slide">
  29. <a href="https://ai.choozmo.com/ai-customer/info/">
  30. <img src="/imgs/home/ChoozMo_AI_Avatar.webp" alt="ChoozMo|AI主播|AI|AI Avatar|AI智能客服|AI人工智慧|人工智能|人工智慧|虛擬人">
  31. </a>
  32. </div>
  33. <div class="swiper-slide">
  34. <!-- <iframe src="https://www.youtube.com/embed/EEl8P8VshKs?si=JCbDL2qYGtE06JYq" title="YouTube video player"
  35. frameborder="0"
  36. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  37. allowfullscreen></iframe> -->
  38. <img src="/imgs/home/亞錦賽-07.webp"
  39. alt="ChoozMo|AI主播|AI|華視|亞錦賽|12月3號到12月10號鎖定亞錦棒球看華視|人工智慧|AI人工智慧|人工智能|虛擬主播|虛擬人|新聞播報">
  40. <div class="cts-player-item">
  41. <div id="cts-player"></div>
  42. </div>
  43. </div>
  44. <div class="swiper-slide">
  45. <div class="toggle-video">
  46. <select onchange="setEwinFrame(this)">
  47. <option value="">切換主題</option>
  48. <option value="0922">0922 杭州亞運開跑</option>
  49. <option value="0926">0926 滑板國手</option>
  50. <option value="0927">0927 跆拳道表現亮眼</option>
  51. <option value="1005">1005 男籃勝</option>
  52. <option value="1010">1010 杭州西湖</option>
  53. </select>
  54. </div>
  55. <img src="/imgs/home/底圖-07.webp"
  56. alt="ChoozMo|AI主播|AI|華視|華視團隊前進杭州 AI主播E-Win越洋連線|杭州亞運開跑|人工智慧|AI人工智慧|人工智能|虛擬主播|虛擬人|新聞播報">
  57. <div class="ewin-player-item">
  58. <div id="ewin-player"></div>
  59. </div>
  60. </div>
  61. <div class="swiper-slide">
  62. <a href="https://www.facebook.com/Ariel0702/?locale=zh_TW" target="_blank">
  63. <img src="/imgs/home/banner-main-01.png"
  64. alt="陳斐娟|克隆娟|三立iNEWS|AI Spokesperson|ChoozMo|AI主播|AI|AI建模|虛擬主播|人工智慧|客製化主播|最新服務|英文AI主播|AI 虛擬主播|生成式 AI技術|Facelandmark|deeplearning">
  65. <img src="/imgs/home/banner-main-02.png" alt="" class="person-img">
  66. </a>
  67. <div class="player-item">
  68. <div id="player"></div>
  69. </div>
  70. </div>
  71. <div class="swiper-slide">
  72. <a target="_blank" href="/main-news/警察廣播電台初次ai主播真人建模-與ChoozMo合作ai影片/">
  73. <div class="wrapper">
  74. <img src="/imgs/home/banner-01.jpg"
  75. alt="ChoozMo|AI主播|AI|警察廣播電臺|警廣|警廣路況|警廣線上收聽|人工智慧|AI人工智慧|人工智能|AI雙主播|雙主播|虛擬主播|虛擬人|新聞播報">
  76. <div class="video-wrapper">
  77. <iframe id="yt_frame" src="https://www.youtube.com/embed/HgrjL8pTpUY?autoplay=1&mute=1"
  78. title="YouTube video player" frameborder="0"
  79. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  80. allowfullscreen></iframe>
  81. </div>
  82. </div>
  83. </a>
  84. <div class="frame-item">
  85. <select onchange="setFrame(this)">
  86. <option value="">切換語言</option>
  87. <option value="國語">國語</option>
  88. <option value="臺語">臺語</option>
  89. <option value="英文">英文</option>
  90. <option value="日文">日文</option>
  91. <option value="泰文">泰文</option>
  92. <option value="印尼文">印尼文</option>
  93. <option value="越南文">越南文</option>
  94. <option value="馬來文">馬來文</option>
  95. <option value="原住民語">原住民語(阿美族)</option>
  96. <option value="客語">客語</option>
  97. <option value="手語">手語</option>
  98. </select>
  99. </div>
  100. </div>
  101. <div class="swiper-slide">
  102. <a href="/main-news/virtual-production-studio-turnkey-solution/">
  103. <img src="/imgs/home/banner-02.jpg"
  104. alt="Turnkey Solution|Virtual Production Studio|AI Spokesperson|ChoozMo|AI主播|AI|AI建模|虛擬主播|人工智慧|客製化主播|最新服務|英文AI主播|AI 虛擬主播|生成式 AI技術|Facelandmark|deeplearning">
  105. <!-- <img src="/imgs/home/banner01_mb.webp" alt="Choozmo in 2023CES" class="d-block d-md-none p-4"> -->
  106. </a>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="swiper-button-next d-none d-md-block"></div>
  111. <div class="swiper-button-prev d-none d-md-block"></div>
  112. <div class="swiper-pagination"></div>
  113. </div>
  114. <script>
  115. // 載入 YouTube API
  116. let tag = document.createElement('script');
  117. tag.src = 'https://www.youtube.com/iframe_api';
  118. let firstScriptTag = document.getElementsByTagName('script')[0];
  119. firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
  120. // 在 API 載入完成後建立影片播放器
  121. let player;
  122. let ewinPlayer;
  123. let cts;
  124. function onYouTubeIframeAPIReady() {
  125. setupPlayer('player', 'vS8D5h7oUU0'); // 克隆娟
  126. setupPlayer('ewin-player', 'YvmyRn6e9uw'); // 亞運
  127. setupPlayer('cts-player', 'EEl8P8VshKs'); // 亞錦賽
  128. }
  129. function setupPlayer(playerId, videoId) {
  130. const player = new YT.Player(playerId, {
  131. videoId: videoId,
  132. playerVars: {
  133. 'autoplay': 0, // 不自動播放
  134. 'controls': 1, // 顯示播放控制項
  135. 'showinfo': 0, // 隱藏影片標題
  136. 'rel': 0, // 不顯示相關影片推薦
  137. },
  138. events: {
  139. 'onReady': function (event) {
  140. // 隱藏影片播放器
  141. event.target.mute();
  142. let posterDiv = document.createElement('div');
  143. let playerItem = document.querySelector(`.player-item`);
  144. let ewinDiv = document.createElement('div');
  145. let playerEwinItem = document.querySelector('.ewin-player-item');
  146. let ctsDiv = document.createElement('div');
  147. let playerCtsItem = document.querySelector('.cts-player-item');
  148. // 設定封面圖片(在影片上放封面圖片 div)
  149. posterDiv.classList.add('poster'); // 克隆娟
  150. event.target.getIframe().parentNode.insertBefore(posterDiv, event.target.getIframe());
  151. ewinDiv.classList.add('ewin'); // 亞運
  152. event.target.getIframe().parentNode.insertBefore(ewinDiv, event.target.getIframe());
  153. ctsDiv.classList.add('cts'); // 亞錦賽
  154. event.target.getIframe().parentNode.insertBefore(ctsDiv, event.target.getIframe());
  155. setTimeout(() => {
  156. playerItem.style.opacity = '1';
  157. playerEwinItem.style.opacity = '1';
  158. playerCtsItem.style.opacity = '1';
  159. }, 100);
  160. posterDiv.addEventListener('click', function () {
  161. posterDiv.style.display = 'none'; // 隱藏封面圖片
  162. event.target.unMute();
  163. event.target.setVolume(100);
  164. event.target.playVideo();
  165. });
  166. ewinDiv.addEventListener('click', function () {
  167. ewinDiv.style.display = 'none'; // 隱藏封面圖片
  168. event.target.unMute();
  169. event.target.setVolume(100);
  170. event.target.playVideo();
  171. });
  172. ctsDiv.addEventListener('click', function () {
  173. ctsDiv.style.display = 'none'; // 隱藏封面圖片
  174. event.target.unMute();
  175. event.target.setVolume(100);
  176. event.target.playVideo();
  177. });
  178. }
  179. }
  180. });
  181. }
  182. function setFrame(select) {
  183. let val = select.value;
  184. if (val === "國語") {
  185. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/HgrjL8pTpUY?autoplay=1&mute=1');
  186. } else if (val === "臺語") {
  187. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/iub7XwIIKsU?autoplay=1&mute=1');
  188. } else if (val === "英文") {
  189. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/J0rMl5Aje8E?autoplay=1&mute=1');
  190. } else if (val === "日文") {
  191. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/STBlnumMtJI?autoplay=1&mute=1');
  192. } else if (val === "泰文") {
  193. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/IQSNsUpzH4M?autoplay=1&mute=1');
  194. } else if (val === "印尼文") {
  195. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/moxFwtySJM8?autoplay=1&mute=1');
  196. } else if (val === "越南文") {
  197. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/QfmlSYbvNsg?autoplay=1&mute=1');
  198. } else if (val === "馬來文") {
  199. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/7jTyzenud8o?autoplay=1&mute=1');
  200. } else if (val === "原住民語") {
  201. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/oGEX1P9AF9Y?autoplay=1&mute=1');
  202. } else if (val === "客語") {
  203. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/OlyafG6Oxtk?autoplay=1&mute=1');
  204. } else if (val === "手語") {
  205. $('#yt_frame').attr('src', 'https://www.youtube.com/embed/ycUAa3iKjhA?autoplay=1&mute=1');
  206. }
  207. }
  208. function setEwinFrame(select) {
  209. let val = select.value;
  210. let player = document.querySelector('#ewin-player');
  211. let ewinImg = document.querySelector('.ewin');
  212. ewinImg.style.display = 'none'; // 隱藏封面圖片
  213. if (val === "0922") {
  214. $('#ewin-player').attr('src', 'https://www.youtube.com/embed/YvmyRn6e9uw?autoplay=1&mute=1');
  215. } else if (val === "0926") {
  216. $('#ewin-player').attr('src', 'https://www.youtube.com/embed/NQ7jKWlWOLk?autoplay=1&mute=1');
  217. } else if (val === "0927") {
  218. $('#ewin-player').attr('src', 'https://www.youtube.com/embed/woLoY-rw2pw?autoplay=1&mute=1');
  219. } else if (val === "1005") {
  220. $('#ewin-player').attr('src', 'https://www.youtube.com/embed/DSMvO1IOHdU?autoplay=1&mute=1');
  221. } else if (val === "1010") {
  222. $('#ewin-player').attr('src', 'https://www.youtube.com/embed/fb-kf9GYErE?autoplay=1&mute=1');
  223. }
  224. }
  225. </script>