Question:
Is it possible to perform autoplay for a video file inside Rich Media?
Answer:
Yes, to do so, the following steps should be performed.
For the iOS platform:
First of all, make sure that the version of the Pushwoosh SDK in your application is not lower than 5.13.1
https://github.com/Pushwoosh/pushwoosh-ios-sdk/releases/tag/5.13.1
On the application side, for the richMediaStyle
object, set the mediaPlaybackRequiresUserAction
flag to NO
and allowsInlineMediaPlayback
to YES
.
[PWRichMediaManager sharedManager].richMediaStyle.allowsInlineMediaPlayback = @(YES);
[PWRichMediaManager sharedManager].richMediaStyle.mediaPlaybackRequiresUserAction = @(NO);
On the HTML side, it is necessary to add the following attributes:
<video width=“192” height=“308" controls=“controls” autoplay muted playsinline>
<source src=“http://youtube.com/video1819124” type=“application/x-mpegURL” />
</video>
For the Android platform, no additional actions on the application side required. Only the necessary attributes in your HTML file.
Comments
0 comments
Please sign in to leave a comment.