我正在使用Android
为Cordova
构建一个Apk,并且我使用插件'Exoplayer'重现了平滑流。
console.log(videoUrl);
var params = {
url: videoUrl ,
hideTimeout: 2000,
showBuffering: false,
controller: { // If this object is not present controller will not be visible
streamImage: 'http://url.to/channel.png',
streamTitle: 'Channel',
streamDescription: '',
hideProgress: false, // Hide entire progress timebar
hidePosition: false, // If timebar is visible hide current position from it
hideDuration: false, // If timebar is visible Hide stream duration from it
controlIcons: {
// Buttons not included in configuration will show up as default ExoPlayer buttons
},
textColor: '#ffff0000', // These colors can be any valid Android color
buttonsColor: '#E6FFE6', // This example uses hex values including alpha (first byte)
bufferingColor: '#ff0000ff' // Alpha of 'ff' makes it 100% opaque
}
};//fin de parms
// window.plugins.exoplayer.setStream(,null);
try{
window.ExoPlayer.show(params, successCallback, errorCallback);
}catch(exception){
console.log(exception);
}
var videoUrl是SmoothStreaming.ism / Manifest,这是问题所在,“ Exoplayer”总是选择质量更高的一个,而我需要根据Internet连接的质量来获得更好的质量。
我尝试解析Uri,但找不到Exoplayer
的类java
的SsmediaSource类,但找不到任何东西。
即使设置为false,播放器也始终在顶部显示蓝色缓冲区。 ( showBuffering:否,)