Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoPlayer 组件参考 #2887

Closed
r1144061577 opened this issue Apr 15, 2024 · 4 comments
Closed

VideoPlayer 组件参考 #2887

r1144061577 opened this issue Apr 15, 2024 · 4 comments

Comments

@r1144061577
Copy link

URL : https://github.com/cocos-creator/creator-docs/blob/master/zh/ui-system/components/editor/videoplayer.md

@r1144061577
Copy link
Author

可以新增一下使用抖音小游戏createOffscreenVideo的代码吗

@MrKylinGithub
Copy link
Contributor

这是抖音小游戏的API吗?

@MrKylinGithub
Copy link
Contributor

在 Cocos 中使用tt和wx等平台相关的API时,直接根据文档来写就行。
https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/media/video/tt-create-offscreen-video

if(window['tt']){
        window['tt'].createOffscreenVideo(....)
}

像这样就行。

@shuishen49
Copy link

你发的这个是老版本的cocos写法在新版的不行。什么都不显示。

在 Cocos 使用 tt 和 wx 等平台相关的 API 时,直接根据文档来写就行。 https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/media/video/tt-create-offscreen-video

if(window['tt']){
        window['tt'].createOffscreenVideo(....)
}

这不是什么好事。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants