I'm making an application that plays videos in webview.
I want to play other music apps while keeping the video playing in the webview.
Is there any way to ignore or disable Audiofocus?
sorry, I'm using a translation tool by DeepL.
Related
In my react-native app I used UIWebView to show html5 audio player to user. I could successfully use MPNowPlayingInfoCenter to show playing info. But when switched to WKWebView (for performance reasons) it stopped show that info. Seems like WKWebView overrides MPNowPlayingInfoCenter. Even though I can open safari and play audio from websites and see not url but text title and can touch play/pause.
How to solve this? Please advise!
I've tried Overriding MPNowPlayingInfoCenter while using WKWebView
I need to change title, track name, image and also enable/disable buttons and track "touch" on them.
what is this ? html5 audio player is a web version which not work in react native i guess
I have an iOS app that plays YouTube video by embedding it in a UIWebView. This allows it to be displayed in the native system player. I do this using this library: https://github.com/youtube/youtube-ios-player-helper
This video has a subtitle track that I would like to keep as an option, but I would like it to be disabled by default. The iOS player seems to enable these subtitles no matter what I do. I have experimented with the different embed options such as cc_load_policy, with no luck.
How can I disable subtitles by default on these videos?
In my app i have UIWebView in which i had give option to user for watch video from video hosting sites(i.e. Youtube, Vimeo, DailyMotion). When I click Home button the app goes to background mode, the video is paused.
I wants to Play sound of that video while app in background mode.
I had implemented same while play local video in AVPlayer. But till now having no luck to achieve this.
I already refereed below stuff:
--> UIWebView: HTML5 audio pauses in iOS 6 when app enters background
--> Is it possible to play video using Avplayer in Background?
If you guys have any solution with this it will be great help.
I have to play Vimeo videos in my iOS application using a video player. I need to log events like play, pause, seek etc. Its not possible to play using MPMoviePlayerController or AVPlayer as Vimeo videos have flash content. I am able to play using UIWebView. But, it is showing default Vimeo player controls. I need to have my own controls to play, pause etc as I need to log those events.
I have tried for lot of solutions. Nothing worked. If anyone knows how to play Vimeo videos using custom player. Please Let me know.
I am able to find out solution for this problem. I have used YTVimeoExtractor present here.
Its README.md file says following :
YTVimeoExtractor helps you get mp4 urls which can be use in iOS's native player. You can even choose between mobile, standard and high definition quality.
YTVimeoExtractor doesn't use UIWebView which makes it fast and clean.
I have used MKMoivePlayerViewController and its notifications - MPMoviePlayerPlaybackStateDidChangeNotification and ˚ notifications to get stop, pause events.
The only official way to use a player besides the Vimeo player to play Vimeo videos is to use third-party player urls provided to PRO members: https://vimeo.com/s/adg
Seems the default action for iOS 6 is to stop the video from playing after I switch to HOME screen. Then if I want to listen to the audio I have to go back to the app and press the 'Play' button again. I am using youtube API.
How can I continue playing the video when the application is in UIApplicationStateInactive and UIApplicationStateBackground. I just want to be able to listen to the audio even if I am on HOME screen or the screen is locked. Should I use a background thread or restart playing the video at the previous position as it was before turning the app inactive?
Take a look at the app 'Jasmine'. They managed to do something similar to what you are seeking. However, UIApplicationStateInactive/UIApplicationStateBackground will cause the video to pause. Double tapping the home button and then pressing the audio play button will cause the video's audio to resume without keeping the app active.
Take a look at the new iOS 7. You may have some luck there.
Inter-App Audio
Now your apps can make beautiful music together. With Inter-App Audio,
apps can register their audio streams to share with other apps. For
example, a series of apps could publish audio streams of instrument
tracks while another uses the combination of these streams to compose
a song. Inter-App Audio also provides for MIDI control of audio
rendering, remotely launching other registered Inter-App Audio apps
and more.