-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
动态更改加载视频地址 #62
Comments
hi, change to a different url during player is playing is not supported yet. |
动态切换不同的清晰度需要在传输协议和封装上下功夫, 可以等 ijkplayer 2.0 版本。 其中 dash 支持无缝切换清晰度。 |
2.0 厉害了 不知道会不会开源 或者什么时候开源 |
不清楚呀,不认识 B站大神 @CaiJingLong |
你好,我想问一下怎么在一个界面动态更改视频地址呢?
我们的视频是有清晰度1和清晰度2两种,对应两个地址。功能要求可以动态切换。
目前代码:
url = url1;
player.setDataSource(url,autoPlay: true);
然后切换的时候:
setState(() {
url = url2;
});
这样操作会报错:
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Bad state: setDataSource on invalid state FijkState.error
null
请问正确的实现方式是什么呢?
The text was updated successfully, but these errors were encountered: