I try this for hours but I can't get it to work. Nothing really special:
Unity WebGL build running on iOS on an iPhone (safari/chrome). It's just a Play-Button an a RenderTexture to render the clip.
The VideoPlayer component looks like this, also nothing special:
Everything works fine on MacOS Safari/Chrome, Android Phones with Chrome Browser or Windows.
Only iOS Devices will not play the clip.
Any suggestions what I could do?
Thanks!
Stephan
Related
I have an app that works completely fine on several different iPhones(5s,6,6s) with different iOS versions but doesn't play sound on simulator(simulator plays sound on safari but not in app).I don't think i have any coding issue such an initialize or such things because it works fine in physical device.
please help me out.
I've used AVAudioPlayer.
I've checked out all of the answers in the following link but it didn't work
for me. Sound not working in iPhone Simulator?
I use Xcode Version 9.4.1 and iOS 11.4 on simulator
I've been working on a project using AVFoundation and on that I've been trying to use the AVMutableVideoComposition's customVideoCompositorClass. Everything works fine in ios 9.x and above.
But when I run the same project in an ios 8.3 device (iPhone 5s), only audio plays and video player remains black for the entire composition playing.
Then I tried to run the AVCustomEdit sample code provided by apple which also uses customVideoCompositorClass for video frame processing (Uses opengl es 2.0). Same black thing also happened there too. In this project for texture generation from CVPixelBufferRef it uses CVOpenGLESTextureCacheCreateTextureFromImage and CVOpenGLESTextureCacheRef. Not sure it causes the black issue?
I would be very happy if anyone can suggest me some pointers regarding this. Thanks in advance.
I met a weird situation. Our iOS app embedded a video in a simple HTML 5 page, and we load it using javascript and UIWebView. It has been working fine until the upgrade of iOS 10.2, and it works fine on all other models of iPads but iPad 4th generation on 10.2. The video just cannot play. The 'play' event never fires. I did some preliminary research. I know iPad 4 is a 32-bit machine. I'm not sure if this has something to do with the weird behavior.
I don't know if this might be a relevant answer, but I had a similar situation when trying to play a video using AVPlayer.
It worked perfectly fine previously on iOS 8 and iOS 9, upgrade to iOS 10.2 and it worked on the simulator but not on devices.
Then I came across this link
h.264 MP4 Playable on iOS 9 No Longer Playable on iOS 10
From reading further, I see the following statements:
There has been a changed in how iOS validates video files.
In our case, we were encoding h.264 video with mp3 audio codec.
iOS 9 had no problem with the video files. iOS 10 does not like them and gave this error when trying to save to the camera roll "Sorry, this type of video cannot be saved to this device"
To fix my error, I just opened the video in Quicktime Player. I then went to File -> Export -> 1080p and then when I used this version of the video, it played in my app using iOS 10.2
Maybe your situation is different, but this helped in my experience.
This bug looks to be resolved as of iOS 9.
The video plays fine on the desktop evergreen browsers, and in stand alone mode on Android devices.
It even plays nice on the iOS8 safari, but once a user goes and adds it to their home screen, the video no longer plays.
I put up an example here http://bugs.readingplus.com/ios8-video-test/.
If you using iOS8 you can play the video, add the url to your home screen and load it up. You will get the controls, but once you touch play all you get is the first frame.
I put the source of the page on Github, or you can just go to the page and view the source.
Am I missing something, is my markup fubared, is this just a bug, has anyone found a work around?
As of iOS 8.3 the issue is partially resolved. I have verified that the video, in the example, now plays when launched from the "Add to Home Screen" link.
The remaining issue is the audio, it is not being rendered/played.
this is great news, can it be confirmed by others?
I don't want to take the plunge and update to 8.3 until I'm confident video and audio in a homescreen webclip are working in iOS 8.3
Looks like iOS 8.3 fixes this issue. I have a standalone web app that uses an audio element, and it's working as expected now. FINALLY!
I have a 'very' simple web page I've thrown together using VideoJS to playback an MP4. This works a treat with desktop browsers and also on the iPhone but fails to load/play on the iPad. Instead I just get a solid black rectangle. I'm completely baffled - any ideas?
http://haslams.net/sandbox
I'm guessing it could possibly be an encoding issue but I'm suprised that it plays back just fine on the iPhone but not the iPad. Both devices have the latest iOS install (5.1.1).
:)
In your link, none of the Video.js setup methods are being used, so basically Video.js isn't running. Add data-setup="{}" as an attribute to the video tag. I'm not sure if that will fix the issue, but it's a start.