carousel.html 12 KB

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