carousel.html 12 KB

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