Riva FLV Player: The Complete Guide for Embedding FLV VideosRiva FLV Player was a popular Flash-based player used to embed and play FLV (Flash Video) files on websites. Although Flash is now deprecated and most modern sites use HTML5 video, many legacy sites and archives still rely on FLV files and Flash players. This guide explains what Riva FLV Player is, how it works, how to embed and customize it, and practical migration options for moving away from FLV/Flash when possible.
What is Riva FLV Player?
Riva FLV Player is a small, customizable Flash (SWF) video player designed to play FLV files. It provided a simple way to embed video with basic controls (play/pause, seek, volume) and supported skins, playlists, and external configuration via XML or JavaScript. Because it runs in the Flash runtime, it required the Adobe Flash Player plugin in the browser.
Key fact: Riva FLV Player is a Flash-based player that plays FLV video files.
Why it was used (and the downsides)
Why it was popular:
- Simple to embed and configure.
- Skinnable interface and playlist support.
- Could stream FLV from HTTP or streaming servers.
- Worked consistently across older browsers with Flash.
Downsides (important today):
- Depends on Adobe Flash, which reached end-of-life and is unsupported in modern browsers.
- Not compatible with mobile devices that never supported Flash.
- Security and performance risks associated with running Flash content.
- No native support for modern codecs or adaptive streaming (HLS/DASH).
Before you start: prerequisites
- FLV video files available on your server or accessible via URL.
- Riva FLV Player SWF file (e.g., riva-player.swf) and any skin files.
- A web page where you can add HTML and optionally JavaScript.
- If you must support modern browsers, consider converting FLV to MP4 (H.264/AAC) and using an HTML5 player instead.
Embedding Riva FLV Player — step-by-step
Below is a step-by-step example for embedding Riva FLV Player using the classic object/embed approach and a basic JavaScript initializer. Adjust file names, paths, and IDs to match your setup.
- Place player files and your FLV on your server:
- riva-player.swf
- skin files (if any)
- video.flv
- Basic HTML embed using object/embed (Flash):
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Riva FLV Player Example</title> </head> <body> <div id="riva-container"> <object id="rivaPlayer" width="640" height="360" type="application/x-shockwave-flash" data="riva-player.swf"> <param name="movie" value="riva-player.swf" /> <param name="allowFullScreen" value="true" /> <param name="wmode" value="opaque" /> <param name="flashvars" value="file=video.flv&autoplay=false&width=640&height=360" /> <!-- Fallback content --> <p>Flash required — or provide a link: <a href="video.flv">Download video</a>.</p> </object> </div> </body> </html>
- The flashvars parameter typically passes the video file (file=video.flv), autoplay, width/height, and other options depending on the player build.
- Some Riva players read configuration from an XML file; in that case, pass config=player-config.xml in flashvars.
- Example using XML config (flashvars -> config=player.xml):
player.xml:
<?xml version="1.0" encoding="utf-8"?> <player> <playlist> <item> <file>video.flv</file> <title>Sample Video</title> </item> </playlist> <settings> <autostart>false</autostart> <width>640</width> <height>360</height> <skin>skins/default.zip</skin> </settings> </player>
HTML flashvars:
<param name="flashvars" value="config=player.xml" />
- JavaScript embed helpers: Many sites used swfobject.js to detect Flash and embed SWFs reliably. Example:
<script src="swfobject.js"></script> <div id="riva-player">Flash required</div> <script> var flashvars = { file: "video.flv", width: "640", height: "360" }; var params = { allowFullScreen: "true", wmode: "opaque" }; swfobject.embedSWF("riva-player.swf", "riva-player", "640", "360", "10.0.0", null, flashvars, params); </script>
Common configuration options
Typical flashvars or XML settings you may encounter:
- file — path to the FLV file (or playlist items).
- autostart/autoplay — true/false.
- width, height — player dimensions.
- skin — path to a skin or skin zip.
- volume — default volume level (0–100).
- playlist — path or inline playlist items.
- config — path to an XML config file.
Exact names vary between specific Riva builds; consult the Riva player README or config examples bundled with your SWF.
Customizing appearance and controls
- Skins: Riva players often support zipped skin packages containing images and XML describing control layout. Replace the skin parameter or file path to change visuals.
- CSS around the player container: Use CSS to position the object/embed element, create responsive wrappers, or overlay custom HTML controls (though interacting with Flash from HTML requires ExternalInterface calls).
- ExternalInterface: Advanced setups can use Flash’s ExternalInterface API to call JavaScript functions from Flash and vice versa (if the SWF exposes those hooks).
Responsive embedding
Flash is not inherently responsive. To approximate responsiveness:
- Place the player in a container with relative width (e.g., 100%) and use JS to scale the SWF dimensions dynamically based on container width while maintaining aspect ratio.
- Example JS resize handler:
function resizePlayer() { var container = document.getElementById('riva-container'); var w = container.offsetWidth; var h = Math.round(w * 9 / 16); // 16:9 aspect var obj = document.getElementById('rivaPlayer'); if (obj) { obj.width = w; obj.height = h; } } window.addEventListener('resize', resizePlayer); resizePlayer();
Troubleshooting playback issues
- Nothing appears: ensure the browser still supports Flash (modern browsers have removed it). Use swfobject to detect plugin presence.
- Video won’t play: confirm the flashvars file path is correct and that the FLV is encoded properly (FLV container with supported codecs).
- Cross-domain errors: Flash imposes crossdomain.xml restrictions when loading media from other domains — ensure a permissive crossdomain.xml is present when serving from CDN or another host.
- Audio/video sync or codec errors: FLV files must use Flash-compatible codecs (e.g., Sorenson Spark, VP6 for older Flash; MP3/ADPCM for audio). Modern encoders may produce incompatible outputs.
Security and compatibility considerations
- Flash EOL: Adobe ended support for Flash and major browsers disabled it. Running Flash content may require legacy browsers or specialized environments. Avoid exposing users to insecure Flash usage.
- Crossdomain policy files: If serving FLV from another domain, configure crossdomain.xml to allow access.
- SSL: Serve both the SWF and FLV over HTTPS to avoid mixed-content blocking on HTTPS pages.
Migration: Converting FLV to modern formats
For long-term viability, convert FLV to MP4 (H.264 video + AAC audio) and use an HTML5 player. Steps:
-
Convert using ffmpeg:
ffmpeg -i input.flv -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k output.mp4
-
Use a modern HTML5 player:
- Native
- Players like Video.js, Plyr, or Clappr for skins, playlists, and plugins.
- For adaptive streaming, transcode to HLS/DASH.
Migration benefits:
- Works on mobile and modern desktop browsers.
- Better security and performance.
- Wider codec support and adaptive streaming options.
When you might still use Riva FLV Player
- Maintaining legacy intranet sites that already run in controlled environments with Flash support.
- Accessing archived FLV content where conversion is temporarily impractical.
- Environments where updating server-side workflows is not possible.
Even in those cases, isolate Flash content, restrict access, and plan migration.
Summary
Riva FLV Player was an easy, skinnable Flash player for embedding FLV videos. Today, Flash is deprecated and you should plan to convert FLV content to modern formats (MP4/HLS) and adopt HTML5 players. If you must use Riva for legacy reasons, embed it with object/embed (or swfobject), pass flashvars or an XML config, ensure crossdomain and HTTPS are configured, and consider JavaScript resizing for responsiveness.
If you want, I can:
- Convert a sample FLV to MP4 with an ffmpeg command tailored to your file.
- Produce a responsive HTML5 player example using Video.js with your video URL.
- Help extract playable FLV metadata to check codec compatibility.
Leave a Reply