carousel.html 12 KB

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