support https hls video
fukemy opened this issue · 6 comments
Hello. can you update support https video? Like the compile ijkplayer with openssl
OK, 30 minutes later.
thanks you veru much :x
Swift Demo use https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8
It works , but wait a long time.
Hello. It's work thanks you. But i got the really strange problem.
First I play that rtmp link:
rtmp://183.91.11.56:51935/fe0e7ba3-a463-4e32-bd2b-6c2f19a6cfaa/live?t=Y1XdCEl08mVNUEkmbrs7S7tVmEMG4dP4o3D5wYoakFI
then it work. When i click to play new video
https://transpox.ai/vod/VIdDITnI80yakUBjzgr6LOu5Y3fWcBnHssA3bkcf_P0/27-8-2018_7h38m11s.mp4/index.m3u8
by remove and renew player:
var playerController : IJKPlayerViewController?
//playerController is container view in storyboard
func configPlayer() {
playerController = (self.childViewControllers.last as! IJKPlayerViewController)
}
if let camUrl = URL(string: videoUrl){
indicator.isHidden = false
playerController?.destroyPlayer()
playerController?.loadPlayer(url: camUrl)
playerController?.delegate = self
}else{
AlertUtils.alertMessage(vc: self, mes: Language.get("Url is not valid"))
indicator.isHidden = true
}
func loadPlayer(url: URL) {
self.url = url
IJKFFMoviePlayerController.checkIfFFmpegVersionMatch(true)
let options = IJKFFOptions.byDefault()
player = IJKFFMoviePlayerController(contentURL: url, with: options)
player?.view?.autoresizingMask = [.flexibleWidth, .flexibleHeight]
player?.view?.frame = view.bounds
player?.scalingMode = .aspectFit
player?.shouldAutoplay = true
view.autoresizesSubviews = true
view.addSubview((player?.view)!)
self.view.backgroundColor = .clear
self.addMediaControl()
self.addAction()
installMovieNotificationObservers()
player?.prepareToPlay()
// player?.play()
mediaControl?.refreshMediaControl()
}
func destroyPlayer() {
if mediaControl != nil{
mediaControl.removeFromSuperview()
}
if player != nil {
player?.shutdown()
}
if player?.view != nil {
player?.view.removeFromSuperview()
}
removeMovieNotificationObservers()
}
then i got error
ijkmp_set_inject_opaque(0x608000010c20)
ijkmp_set_inject_opaque()=void
ijkmp_set_ijkio_inject_opaque(0x608000010c20)
ijkmp_set_ijkio_inject_opaque()=void
2018-08-29 22:38:41.834399+0700 iCamera[10118:213931] OK setup GL
ijkmp_ios_set_view(glView=0x7fc7c9f03cf0)
ijkmp_ios_set_view(glView=0x7fc7c9f03cf0)=void
2018-08-29 22:38:41.836046+0700 iCamera[10118:213931] invalidateRenderBuffer
2018-08-29 22:38:41.836209+0700 iCamera[10118:214348] IJKSDLGLView:display: unable to tryLock GL active: 0
ijkmp_set_data_source(url="https://transpox.ai/vod/8ZcYtm_e2vzanNd2jkGEJnyX85Q2KC08DlRXzggiPo4/27-8-2018_7h38m11s.mp4/index.m3u8")
ijkmp_set_data_source(url="https://transpox.ai/vod/8ZcYtm_e2vzanNd2jkGEJnyX85Q2KC08DlRXzggiPo4/27-8-2018_7h38m11s.mp4/index.m3u8")=0
ijkmp_prepare_async()
ijkmp_prepare_async()=0
ijkmp_shutdown_l()=void
ijkmp_set_inject_opaque(0x0)
ijkmp_set_inject_opaque()=void
ijkmp_set_ijkio_inject_opaque(0x0)
ijkmp_set_ijkio_inject_opaque()=void
ijkmp_dec_ref(): ref=0
ijkmp_shutdown_l()
ijkmp_shutdown_l()=void
aout_close_audio()
2018-08-29 22:38:41.847612+0700 iCamera[10118:213931] invalidateRenderBuffer
2018-08-29 22:38:41.847770+0700 iCamera[10118:214348] IJKSDLGLView: setupDisplay not ready
2018-08-29 22:38:41.892046+0700 iCamera[10118:213931] FFP_MSG_ERROR: 0
IJKMPMoviePlayBackStateDidChange Optional(__C.IJKMPMoviePlaybackState): paused
playbackStateDidChange: IJKMPMovieFinishReasonPlaybackError: 1
onFailed PlayerDelegate: error!
When hardcode player to run this link:
https://transpox.ai/vod/VIdDITnI80yakUBjzgr6LOu5Y3fWcBnHssA3bkcf_P0/27-8-2018_7h38m11s.mp4/index.m3u8
It's work..... then i can play all same link with m3u8 format. I think the problem is switching between rtsp and hls format in one player is not accepted here.
I dont know what's kind of that problem. Can you help? May be it's out of my knowledge to solve it :((
Sorry, I can't play rtmp://183.91.11.56:51935/fe0e7ba3-a463-4e32-bd2b-6c2f19a6cfaa/live?t=Y1XdCEl08mVNUEkmbrs7S7tVmEMG4dP4o3D5wYoakFI
with VLC Player. So I find other rtmp
source.
I update the swift demo, you need set storyboard to Main.storyboard
.
I use IJKFFMoviePlayerController
to play, it's ok.
If you like IJKPlayerViewController
, I try it tomorrow.
hello.
Big thank to you.
After compare between your sample and my project, I found the light of future. The problem is the server mapping is null, so I can not play hls link, I ask the server update and now all working as expect. :)