beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
Ops.Html.BrowserSpecificFile

BrowserSpecificFile
op id:3bf999bc-3433-4893-9c85-9633e096c01d
Outputs a specific file for each browser

summary (oneliner)

Browsers support file-types differently. E.g. to create a gapless audio loop, you cannot simply loop an MP3 file, you need to create an M4A-file for Safari, an OGG-file for Firefox and an MP3-file for Chrome (and the other browsers). Otherwise the loop will have a tiny, but noticeable gap.
This op let’s you specify filenames specific for each browser. It does not handle loading of files, just the filenames.

doc

issues

youtube id

collections

related ops

Inputs

Chrome File (string Number)

Filename to be used in Googe Chrome


Firefox File (string Number)

Filename to be used in Firefox


Safari File (string Number)

Filename to be used in Safari


IE <= 11 File (string Number)

Filename to be used in Internet Explorer <= 11


Edge File (string Number)

Filename to be used in Edge


Opera File (string Number)

Filename to be used in Opera


Default File (string Number)

Filename to be used if there is no specific file defined for the current browser


Outputs

Browser Specific File (string Number)

The filename specific to the current browser


Detected Browser (string Number)

The detected browser


Play Browser Specific Audio Loop Example:

Shows how to serve a browser-specific audio file. Loads .ogg in Firefox, .m4a in Safari and .mp3 in all other browsers.



Credits

Caught a mistake or want to contribute to the documentation?


Edit this documentcancel save

Examples using BrowserSpecificFile

Public Patches using BrowserSpecificFile