HTML5 audio and video in Firefox

Firefox Firefox Paskiausiai atnaujintas: 26% of users voted this helpful
No one has helped translate this article yet. If you already know how localizing for SUMO works, start translating now. If you want to learn how to translate articles for SUMO, please start here.

Firefox handles many types of audio and video content on web pages, and can also open links to MP3 files and some other types of media. This article explains which media formats you can play and how to control, save, and open them.

Supported formats

Since the use of certain audio and video file types is restricted by patents, a third-party application is required to use them. Firefox, however, is able to play natively open media and some types of patented media.

Open media

Firefox can play the WAV container format (.wav, .wave file types) containing uncompressed audio in PCM at 8 or 16 bits per sample.

Vorbis audio, Opus audio, Theora video and VP8 video are free audio/video compression formats for use without patent restrictions. They can be viewed in Firefox if they are embedded in the following container formats: Ogg (.ogg, .oga, .ogv, .ogx, .spx, .opus file types) or WebM (.webm file type).

Firefox also supports FLAC (Free Lossless Audio Codec) playback (.flac file type) and MP3 playback (.mp3 file type).

Patented media

AAC and H.264/MPEG-4 AVC are patented audio/video compression formats. They can be viewed in Firefox using built-in OS libraries (so neither Mozilla nor you need to pay a fee) if embedded in the MP4 container format (.mp4, .m4a, .m4p, .m4b, .m4r, .m4v file types).

Firefox supports WebM/VP9 video on systems that don't support MP4/H.264.

Tip: In order to test your system, some sample video files are available in the HTML5 Video Test Page at tekeye.uk.

Audio and video controls

Control bar

When you follow a link to open a supported audio or video file in Firefox or when you visit a website that includes supported media, you will see controls for managing playback. Controls for video will appear when you hold the mouse pointer over the media on the page.

Fx124Win10VideoControls

  • Play button: Fx124Win10VideoPlay Starts playback.
  • Pause button: Fx124Win10VideoPause Stops playback once it has started.
  • Position slider: Fx124Win10VideoPositionSlider
    Indicates how much time has elapsed since the beginning of the file.
    Drag the slider left or right to go back or forward.
  • Volume control: Fx124Win10VideoSoundSlider
    Click the loudspeaker to mute or unmute.
    Hover and drag the slider left or right to adjust the volume.
  • Full-screen button: Fx124Win10VideoFullscreen Toggles full screen when in default size.
  • Default size button: Fx124Win10VideoDefaultSize Restores the default size when in fullscreen.

Context menu controls

The context menu (accessible via right-clickCtrl-click) includes the above controls except the sliders, and also let you:

  • Accelerate or reduce the playback rate: Select Speed and then one of the available speeds.
  • Play video over and over: Select Loop so that the video will play over and over automatically.
  • Hide controls: Select Hide Controls so that the bottom control bar never show up. To show them, select Show Controls.

Keyboard controls

After you click the media on a web page, to give it focus, you can control the playback with your keyboard.

Command Shortcut
Toggle Play / Pause Space bar
Decrease volume
Increase volume
Mute audio Ctrl + Command +
Unmute audio Ctrl + Command +
Seek back 5 seconds
Seek back 10% Ctrl + Command +
Seek forward 5 seconds
Seek forward 10% Ctrl + Command +
Seek to the beginning Home
Seek to the end End

Saving media files

To save an audio file from a web page to your computer:

  1. Right-clickHold down the Control key while you click the audio controls and select Save Audio As…
  2. Select a location on your computer to save the file.

To save a video file from a web page to your computer:

  1. Right-clickHold down the Control key while you click the video controls and select Save Video As…
    • Select Take Snapshot… if you only want to save the video snapshot.
  2. Select a location on your computer to save the file.

Opening saved files

The media files you save from web pages may not play in your normal media player. To open these types of files:

  1. Open Firefox.
  2. Click Ctrl + OCommand + O.
  3. Navigate to the folder that contains the file you want to play, select the file, and click Open.

Troubleshooting

If you are having problems with audio or video files, see:

Ar šis straipsnis buvo naudingas?

Luktelėkite…

These fine people helped write this article:

Illustration of hands

Volunteer

Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More