亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 Reactjs 上集成 BoxCast 播放器?

如何在 Reactjs 上集成 BoxCast 播放器?

暮色呼如 2023-08-10 15:36:40
因此,我嘗試在我的 React 應用程序(javascript 應用程序)上集成 BoxCast 播放器,但我不知道該怎么做。有人知道我能做什么嗎?PS:我的問題是 iframe 沒有響應,所以我嘗試使用 javascript 。<div id="boxcast-widget-{video-example}"></div><script type="text/javascript"charset="utf-8">    (function (d, s, c, o) { var js = d.createElement(s), fjs = d.getElementsByTagName(s)[0]; var h = (("https:" == document.location.protocol) ? "https:" : "http:"); js.src = h + "//js.boxcast.com/v3.min.js"; js.onload = function () { boxcast.noConflict()("#boxcast-widget-" + c).loadChannel(c, o); }; js.charset = "utf-8"; fjs.parentNode.insertBefore(js, fjs); }(document, "script", "{video-example}", { "showTitle": 0, "showDescription": 0, "showHighlights": 0, "showRelated": false, "showCountdown": false, "market": "smb", "showDocuments": false, "showIndex": false, "showDonations": false, "autoplay": "try-muted", "playInline": true, "dvr": false }));</script>謝謝!
查看完整描述

2 回答

?
LEATH

TA貢獻1936條經驗 獲得超7個贊

因此,我嘗試在我的 React 應用程序(javascript 應用程序)上集成 BoxCast 播放器,但我不知道該怎么做。有人知道我能做什么嗎?PS:我的問題是 iframe 沒有響應,所以我嘗試使用 javascript 。


<div id="boxcast-widget-{video-example}"></div>

<script type="text/javascript"charset="utf-8">

    (function (d, s, c, o) { var js = d.createElement(s), fjs = d.getElementsByTagName(s)[0]; var h = (("https:" == document.location.protocol) ? "https:" : "http:"); js.src = h + "//js.boxcast.com/v3.min.js"; js.onload = function () { boxcast.noConflict()("#boxcast-widget-" + c).loadChannel(c, o); }; js.charset = "utf-8"; fjs.parentNode.insertBefore(js, fjs); }(document, "script", "{video-example}", { "showTitle": 0, "showDescription": 0, "showHighlights": 0, "showRelated": false, "showCountdown": false, "market": "smb", "showDocuments": false, "showIndex": false, "showDonations": false, "autoplay": "try-muted", "playInline": true, "dvr": false }));

</script>

謝謝!


查看完整回答
反對 回復 2023-08-10
?
慕哥9229398

TA貢獻1877條經驗 獲得超6個贊

這看起來并不兼容 React。如果您堅持從 React 使用它,則需要集成它。

這可能是一項乏味的工作,我不鼓勵你這樣做。尋找另一個聲稱與 React 兼容的提供商。


查看完整回答
反對 回復 2023-08-10
  • 2 回答
  • 0 關注
  • 129 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號