We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#864 根据上面的提示,发现color和style是结合使用的,但color是false时还是使用style样式,文字还是绿色的,示例代码如下:
import {createApp, onMounted} from 'vue' import Player from 'xgplayer'; import 'xgplayer/dist/index.min.css'; import Danmu from 'xgplayer/es/plugins/danmu' import 'xgplayer/es/plugins/danmu/index.css' createApp({ setup() { onMounted(() => { const comments = [{ duration: 10000, id: 1, start: 1000, color: true, txt: "我是弹幕1", style: { color: 'red', fontSize: '20px', padding: '0px 0px' }, mode: "scroll" }, { duration: 10000, id: 2, start: 1000, color: false, txt: "我是弹幕2", style: { color: 'green', fontSize: '20px', padding: '0px 0px' }, mode: "scroll" } ]; let player = new Player({ id: 'xgplayerDiv', url: '../xgplayer-demo-720p.mp4', height: '100%', width: '100%', plugins: [Danmu], danmu: { comments: comments } }); }); } }).mount("#mydiv1");
运行效果如下:
color都false了,文字不应该是彩色的啊。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#864
根据上面的提示,发现color和style是结合使用的,但color是false时还是使用style样式,文字还是绿色的,示例代码如下:
运行效果如下:
color都false了,文字不应该是彩色的啊。
The text was updated successfully, but these errors were encountered: