Embedding Viostream Videos in Moodle
Moodle is a widely-used learning management system (LMS) that allows educators to create engaging online courses. Embedding Viostream videos in your Moodle courses enhances the learning experience by providing high-quality video content directly within your course materials.
Quick Setup
To embed Viostream videos in Moodle, you can use the HTML block or add content directly to course sections. Here's the basic process:
- Turn editing on in your Moodle course
- Add an activity or resource > Label or use an HTML block
- Switch to HTML view in the text editor
- Paste your Viostream embed code
- Save changes
Moodle Text Editor Configuration
If you're a Moodle administrator, you may need to configure the text editor to allow iframe embeds. In the TinyMCE editor settings:
// In your Moodle configuration or TinyMCE settings
$CFG->allowobjectembed = true;
// For TinyMCE specifically, ensure iframes are allowed
$CFG->tinymce_allowediframe = 'play.viostream.com';
Embedding Methods
Method 1: Using Labels
Labels are perfect for adding video content to course sections:
- Turn editing on in your course
- Click Add an activity or resource
- Select Label from the resources section
- In the label text editor, click the HTML button (looks like
<>
) - Paste your Viostream embed code
- Click Update to save
Method 2: Using HTML Blocks
HTML blocks provide more flexibility for video placement:
- Turn editing on in your course
- Click Add a block > HTML
- Configure the block title (or leave blank)
- In the content area, paste your Viostream embed code
- Save changes
Method 3: Course Description or Topic Summary
Add videos directly to course or topic descriptions:
- Go to Course administration > Edit settings
- In the course summary, click the HTML button
- Paste your Viostream embed code
- Save and display
Method 4: Using Pages or Books
For more structured content with videos:
- Add a Page or Book activity
- In the content editor, click the HTML button
- Paste your Viostream embed code alongside other content
- Save and return to course
Example Viostream Embed Code
Your Viostream embed code will look something like this:
<iframe
src="https://play.viostream.com/embed/abc123xyz"
width="640"
height="360"
referrerPolicy='strict-origin-when-cross-origin'
frameborder="0"
allowfullscreen>
</iframe>
Making Embeds Mobile-Friendly
For responsive video embeds that work well on mobile devices, wrap your iframe in a responsive container:
<div style="position: relative; width: 100%; height: 0; padding-bottom: 56.25%; margin: 1rem 0;">
<iframe
src="https://play.viostream.com/embed/abc123xyz"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
frameborder="0"
allowfullscreen>
</iframe>
</div>
Moodle Theme Considerations
Different Moodle themes may handle embedded content differently:
Boost Theme (Default)
- Works well with responsive embeds
- Consider using Bootstrap classes for better integration
Classic Theme
- May need additional CSS for proper video sizing
- Test video display across different screen sizes
Custom Themes
- Check with your theme developer for optimal embed practices
- Some themes may have specific video embed components
Administrator Configuration
Allowing Iframe Embeds
Moodle administrators need to ensure iframe embeds are permitted:
- Go to Site administration > Security > Site policies
- Enable Allow EMBED and OBJECT tags
- In Plugins > Text editors > TinyMCE HTML editor
- Add
iframe[src|width|height|frameborder|allowfullscreen]
to Extended valid elements
Content Security Policy
If your Moodle site uses Content Security Policy (CSP), add Viostream to the allowed frame sources:
frame-src 'self' play.viostream.com;
Troubleshooting Common Issues
Video Not Displaying
If your Viostream video isn't showing:
- Check permissions: Ensure your role can embed HTML content
- Verify embed code: Confirm you're using the correct Viostream iframe code
- Test in HTML view: Switch to HTML editor and check the code is preserved
- Check site policies: Verify iframe embeds are allowed site-wide
Content Being Removed
If Moodle strips your embed code:
- Check text editor settings: Ensure iframes are in extended valid elements
- Review user permissions: Some roles may have restricted HTML capabilities
- Contact administrator: Site policies may need adjustment
Mobile Display Issues
If videos don't display properly on mobile:
- Use responsive containers: Wrap iframes in responsive divs
- Test on different devices: Check various screen sizes
- Consider Moodle app: Some embeds may not work in the mobile app
Performance Considerations
For courses with multiple videos:
- Use video thumbnails: Consider linking to videos rather than embedding all
- Lazy loading: Some Moodle themes support lazy loading for better performance
- Consider bandwidth: Be mindful of students with limited internet connections
Best Practices for Educational Use
Course Structure
- Organise by topics: Group related videos in course sections
- Provide context: Add descriptions before and after videos
- Include transcripts: Link to or embed video transcripts for accessibility
Student Engagement
- Discussion forums: Create forums for video-related discussions
- Assignments: Use videos as basis for assignments or reflections
- Quizzes: Create quizzes based on video content
Accessibility
- Captions: Ensure videos have captions for hearing-impaired students
- Alternative formats: Provide audio descriptions where necessary
- Keyboard navigation: Test that embedded players work with keyboard-only navigation
Integration with Moodle Activities
Assignments
Reference specific videos in assignment briefs:
<p>Watch this video before completing your assignment:</p>
<iframe src="https://play.viostream.com/embed/abc123xyz" width="640" height="360" frameborder="0" allowfullscreen></iframe>
Forums
Embed videos in forum discussions to illustrate points or provide examples.
Quizzes
Use videos as stimulus material for quiz questions.
Additional Resources
- Moodle Documentation on Embedding Media
- Viostream Embedding Guide
- Making Embeds Responsive
- Moodle Accessibility Guidelines
If you're experiencing issues with Viostream embeds in Moodle, check that your Moodle administrator has enabled iframe embeds and that your user role has permission to add HTML content to courses.