Video/audio compatibility on ios/android, iosandroid

Source: Internet
Author: User

Video/audio compatibility on ios/android, iosandroid

1. audio automatic playback

1 <audio src='xxx.mp3 'autoplay> </audio>

The above is the audio tag autoplay attribute, which indicates automatic playback. However, some Android browsers and safari on ios do not play the video automatically.
Most Android and ios players can know how to play videos.
If the iPhone 5 and iPhone 6 s versions are upgraded to the same version, the iPhone 5 can be played automatically, but the iPhone 6 s won't. This situation can be referred to: http://www.w3cmark.com/2016/434.html

In Yixin, ios can play automatically, but Android cannot play automatically.

Note the following points on the reference page: Two function methods will be executed, and three function methods will be executed in Yixin. If Android is not tested, you can test the function by yourself.

Solution:

Ios:, Yixin automatic playback,
Android: automatic playback

Other browsers: Set a front page or button to guide the user to trigger the event and execute the play () method of audio.

2. Automatic video Playback

1 <video src = "xxx.mp4" autoplay> </video>

The situation is basically the same as that of audio. A little difference is that in Android, videos are not automatically played and need to be played manually.

In this solution, we need to classify Android Yixin as another browser processing solution mentioned above.

3. The video Android video cannot be hidden after playback, and the problem of keeping the video recommendation interface unchanged cannot go into the next original display interface

(Video recommendation page-figure)

 

At first, the video tag is hidden for the ended event triggered when the video is played. The result is not good ~, Whether the ended event is not triggered, and then an alert test is put in the ended callback function,

If a test is triggered to alert, the ended event is executed normally.
Then I thought that since the video can be executed, I would be a little bit harsh. After ended, I removed the video tag. Finally, I still cannot !!

After that, various queries and various attempts will not work.

Currently, you can only jump to the next page by redirecting to the page. Location. href = 'Next interface Path'

(Hope you can solve this problem by not redirecting to the page)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.