Я создаю Apk для Android
с Cordova
и использую плагин «Exoplayer» для воспроизведения Smooth Streaming.
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» всегда выбирает более качественный, и мне нужно получить лучший в зависимости от качества подключения к Интернету.
Я попытался разобрать Uri, но я не нахожу ничего похожего на класс SsmediaSource Exoplayer
для java
, но я ничего не нахожу.
И игрок всегда показывает синий буфер вверху, даже если он установлен как ложный. ( showBuffering: false, )