TWO Video Questions

jorchin-3930
Community Member Posts: 47 ☆ Roadie ☆
I have two questions in regards to adding an embedded video in Lectora online.
1: Is it possible to have an image thumbnail as opposed to a black screen before the user clicks the play button on the video?
2: When I upload my video I get small black bars on the left and right side of the video. After doing some research I see that its usually because Lectora is adding in the height of the player to the video dimensions. Is there a workaround for this?
Thanks!
1: Is it possible to have an image thumbnail as opposed to a black screen before the user clicks the play button on the video?
2: When I upload my video I get small black bars on the left and right side of the video. After doing some research I see that its usually because Lectora is adding in the height of the player to the video dimensions. Is there a workaround for this?
Thanks!
Comments
-
For item 1:
To show a poster (thumbnail) image for the video before it starts playing, you can add an image to the title and add a couple of Run Javascript actions (one to image and one to video). Basically, when the page loads it will set the image URL to the "poster" attribute of the video player. The player will then show the image until you play the video.
Note that I only tested with MP4 videos. Also, this will work in published content only - does not work in Run Mode.
Here are the steps:- On the page with the video, add an image that you want to use as poster and make it a very small size. Make sure this image is above the video on the left-hand-pane of the editor so that it will be behind the video when rendered. Also set the opacity to 0 (opacity setting is on Style tab). We just want that image available on the page but not actually show it as an image.
- To that image, add a "Run Javascript" action with trigger "Show" with the following code:
window.myPoster = %HTMLNAME%;
- To the video, add a "Run Javascript" action with trigger "Show" with the following code:
window.myVideo = %HTMLNAME%;
if(myVideo && window.myPoster && myPoster.dCon)
myVideo.mePlayer.poster = myPoster.dCon.src;
- Click on Page Preview (F9) to test it.
If you are using the default controller, Lectora Online should determine the correct video size and you should not see any horizontal or vertical black bars. If you change the controller from the Playback Options tab, you may see black bars since the controller height changes. To fix it go to Position & Size tab and un-check (un-highlight) Maintain Ratio. Then fine adjust the Width or Height as needed.
Robert. -
@raungnaing This worked for me initially but now it is not displaying my thumbnail image anymore. Has there been updates to code along that way?
Thanks!
Categories
- 4.7K All Categories
- 3 New Feature Releases
- The Training Arcade®
- Arcades™
- 57 ✫ Announcements
- 6 ✪ Contests
- 34.1K eLearning Brothers® Products
- 33.6K Lectora®
- 31.6K Lectora Discussions
- 1.9K Lectora Feature Requests
- 64 Lectora User Groups
- 16 Asset Library
- 10 AssetLibrary Discussions
- 6 AssetLibrary Feature Requests
- 291 CenarioVR®
- 169 CenarioVR Discussions
- 122 CenarioVR Feature Requests
- 29 Rockstar Learning Platform®
- 20 Rockstar Learning Platform Discussions
- 9 Rockstar Learning Platform Feature Requests
- 4 Off-the-Shelf Course Library
- 3 Off-the-Shelf Course Library Discussions
- 1 Off-the-Shelf Course Library Feature Requests
- 114 CourseMill®
- 107 CourseMill Discussions
- 43 ReviewLink®
- 31 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 2 The Training Arcade®
- 1 The Training Arcade Discussions
- 1 The Training Arcade Feature Requests
- 10 Additional Learning Products
- 2 Adobe®
- 4 Articulate®
- 2 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 912 All Things eLearning
- 5 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 11 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 546 Learning Management System (LMS) Integration
- 2 Mobile Learning
- 5 Visual Design
- 328 Web Accessibility
- 1.2K ♪ The Green Room
- 7 ♡ Community Feedback
- 7 Community Tips