I have tried for popcorn.capture.jsand set preload="auto",the first just suits firefox and the next suits pc browser. I want some way to achieve in mobile (Wechat). Could you help me?
How can I use dynamically the first frame as poster in mobile HTML5 video?
5.5k views Asked by Wentao Wan At
2
There are 2 answers
0
Hemmingsen
On
I solved this problem by adding autoplay to my video tag and pausing the video on load.
window.onload = function(){
var myVideo = document.getElementById('myVideo');
myVideo.pause();
}
<video id="myVideo" autoplay controls>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</video>
Related Questions in HTML
- How to store a date/time in sqlite (or something similar to a date)
- How to use custom font during html to pdf conversion?
- Storing the preferred font-size in localStorage
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- Is there any way to glow this bulb image like a real light bulb
- With non-graphical maps in Leaflet, zoomDelta doesn't work
- What can I do to improve my coding on both html and css
- Uncaught TypeError: google.maps.LatLng is not a constructor at init (script.js:7:13)
- Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
- Displaying a Movie List on a Website Using Jinja2 and Bootstrap
- How to redirect to thank you page after submitting a Google form embedded into a Google Site?
- Storing selected language in localStorage
- Fences (parenthesis, braces) in HTML and MathML
- Understanding Scroll Anchoring Behavoir
Related Questions in VIDEO
- Media player stops about every 5 minutes
- Video Format is not supported or source is unavailable. - Opera
- How to get text and other elements to display over the Video in Tkinter?
- Can I use local resources for mp4 playback?
- Merge (concat) all video file present in '43. DP (Part1)' and put it into '43. DP (Part1)' and give name merged (concat) file to folder name
- Google Chrome is consuming a lot of CPU on a video call?
- How do I automate a video download with Selenium and Python (Meta Quest Store Trailer Download)
- Safari skipping 5 seconds into react-player video - anyone have experience with this?
- Why is toDataURL() returning blank image? (with p5 video)
- How do I circular crop using matlab?
- Cannot find 'IsacCodec' in scope
- playing multiple videos with libvlcsharp on multiple monitors
- Video controls are hidden behind input feature?
- Anyone around Good at both Javascript and Youtube api?, I am using lite-youtube js and I am confused in adding an eventlistener for onStateChange
- videos are resizing themselves while scrolling
Related Questions in MOBILE
- Doesn't work TrafficStats.clearThreadStatsTag() in Kotlin
- KeyboardAvoidingView makes a messy the flexbox
- How can I find a lost Samsung Device?
- How can I eliminate or deactivate the white flash that appears when I press a button via a mobile device?
- In MAUI how can I Show different appshell tabbars depending on the user role?
- Why doesn't TrafficStats.clearThreadStatsTag() work in Kotlin?
- How can I create an animation like WhatsApp archive button spawn animation with SwiftUI on watchOS?
- Not showing the widget wrapped with Obx in Android 14
- Is there a way to use Family Link group in my own application?
- Is it viable proxying all my mobile apps requests, to some kind knowing that a request is coming from a secure source
- How can I connect android app to arduino via Bluetooth?
- How to animate calculated position/container height when viewport changes?
- Unnecessary override. Try adding behavior in the overriding member or removing the override
- Selecting an option in the mobile app drop down which is not visible when the app is loaded for the first time
- Getting Real-Time Sensor Data from Smart Watches
Related Questions in PRELOAD
- What is the proper syntax for preloading a variable font?
- How to preload image based on screen size
- How to build SAPUI5 application that should only have "component-preload.js"?
- Preloading <picture> element loads two images
- Is there a way to preload all pages in WPF
- Issue about preload directives Fonts in Wordpress
- WordPress add_action('wp_head'... not working
- What is the corect way to preload images in React?
- How to Preload product pictures in Shopify?
- How to handle videos properly with Vite and React?
- Debugging Chromium preload script in devtool, no source map
- Preload android application on tablet
- Asp.net Application Initialization not hitting init page
- Nuxt 3 unable to preload css
- Why am I facing SSL issues in a production environment when using Chrome's Speculation Rules for prerendering?
Related Questions in POPCORNJS
- Vimeo video not playing in chrome browser. it works in Firefox and Edge. using popcornjs
- Issues when using Kirby with PopcornJS
- Getting [object HTMLSpanElement] instead of a string
- Periodic event in popcorn.js
- How to use popcorn to a certain video source?
- Can popcorn.js detect switching videos and continue without restarting?
- can't make popcorn.js work
- Popcorn.js not working in Angular.js
- how to remove event listener from this during callback
- How to set currentTime in popcorn.js when a link is clicked?
- How can I use dynamically the first frame as poster in mobile HTML5 video?
- Synchronizing multiple HTML5 videos
- html5 video currentTime does not work when builded by Cordova
- HTML5 popcornjs video have seconds offset/delay in android smartphones/tablets
- Youtube video in popcorn webmaker is not loading, Infinitely buffering a video
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
On mobile devices the device will not start to download the video automatically, as you may be aware. This is to avoid the user running up large data bills.
Because the bowser has not downloaded the video it can't extract the first frame to display it, so you need to use the poster mechanism in HTML5 to display an image as the thumbnail.
One common approach is to generate the thumbnail on the server side when you 'ingest' or add the video to the server and save it where it can be served as the video poster.