Open webbkvalite opened 5 years ago
I didn't find this anywhere else either so I built it :)
I have updated the code to work with cordova 9 - unfortunately I don't use Ionic 4 so I am not sure what changes are needed to support it. A PR would be most welcome but in the meantime do you want to try cordova 9?
Does this plugin work with HLS video streaming url for example?
This plugin is awesome, but I think Ionic and the IOS version they build with edits the code as these are the warnings that you get:
[20:58:10]: ▸ Compiling RmxAudioPlayer.m
[20:58:13]: ▸ ⚠️ /cordova-plugin-playlist/RmxAudioPlayer.m:124:9: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
[20:58:13]: ▸ _isWaitingToStartPlayback = !startPaused;
[20:58:13]: ▸ ~ ^~~~~
[20:58:13]: ▸ ⚠️ /cordova-plugin-playlist/RmxAudioPlayer.m:125:13: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
[20:58:13]: ▸ if (_isWaitingToStartPlayback) {
[20:58:13]: ▸ ^
[20:58:13]: ▸ ⚠️ /cordova-plugin-playlist/RmxAudioPlayer.m:130:13: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
[20:58:13]: ▸ if (_isWaitingToStartPlayback) {
[20:58:13]: ▸ ^
[20:58:13]: ▸ ⚠️ /cordova-plugin-playlist/RmxAudioPlayer.m:927:78: 'initWithImage:' is deprecated: first deprecated in iOS 10.0 - Use -initWithBoundsSize:requestHandler: [-Wdeprecated-declarations]
[20:58:13]: ▸ return [self isCoverImageValid:coverImage] ? [[MPMediaItemArtwork alloc] initWithImage:coverImage] : nil;
I tried editing the ios RmxAudioPlayer.m file to have self->_isWaitingToStartPlayback but this didn't solve the issue
I forked from this branch and made it work for ionic 5. I am still testing but it does compile and gets deployed to iPhone 8. I found another issue where going backwards after playlist is ended throws an exception, I had to modify the previous method to handle this scenario. Hope this helps someone.
Expected Behaviour
To work with Ionic4 and Cordova 9. Any plans / timeline on this? (Good job with the playlist function though! Are you the only one who have done this for Cordova? I can't find any other code...)
Actual Behaviour
Not compiling