Vinyl is an HTML5 playback engine for Dash and HLS streaming. It features high stability, performance, bundle size, compatibility, and standards compliance.
Vinyl is designed with a strong focus on performance, leveraging advanced techniques to deliver a seamless user experience. It supports network prioritization, ensuring that critical data is delivered first for uninterrupted playback. Just-in-time buffering allows Vinyl to efficiently manage resources by decoding data only when needed, minimizing delays. The custom sub-millisecond SAX DASH parser enables lightning-fast processing of media streams, further reducing initial playback delay. Additionally, Vinyl’s track preloading feature allows applications to anticipate user actions, loading tracks in advance to eliminate any lag or buffering during transitions, resulting in smooth, responsive audio playback.
Vinyl takes an opinionated, zero-runtime-dependency stance. By shedding any dependent frameworks or libraries, Vinyl bundles at 200 KiB (75 KiB gzipped), making it 50-90% smaller than alternatives, which improves performance, compatibility, and project longevity. Provided configuration can be tuned to optimize for low-memory or variable network-devices.
Vinyl supports ultra-high-definition audio for exceptional sound quality even on devices with limited memory resources. It achieves this by efficiently managing data, allowing it to work within small source buffer quotas. This means that, despite the high demands of processing detailed audio files, the engine can still deliver crystal-clear sound without overwhelming the device's memory, making high-fidelity audio accessible to a broader range of devices.
When a code change is made, it goes through 100% line and branch coverage with unit tests, and an extensive suite of automated integration and compatibility tests. After code reviews, the change is tested on a QA server using the test shell. After QA approval, the tested SHA is stamped to be released. That version is cut to a release branch and deployed to CodeArtifact. Once live, Vinyl uses a unique system to isolate runtime issues (reported when using the VinylAmzn player). The Vinyl libraries contain markers to determine if an uncaught exception or unhandled promise rejection originated from one of the libraries. Errors are categorized and prioritized based on the type, e.g. service internal/external, uncaught, parsing, media, etc. and emitted to CloudWatch for monitoring.
To ensure high compatibility across various devices and browsers, integration tests are run on BrowserStack, a cloud-based testing platform. This allows developers to simulate real-world conditions by testing the application on multiple operating systems, browsers, and devices. By identifying and fixing issues in this diverse environment, the platform guarantees that the application works seamlessly for all users, regardless of their chosen device or browser, leading to a more reliable and consistent user experience.
Vinyl NPM bundles contain ES5 and ES6 versions, compatible across 99.9% of browsers.
Vinyl currently supports Widevine (Chrome/Firefox) and FairPlay (all iOS browsers, or Safari macOS).
| Browser | Support |
|---|---|
| Google Chrome | v52+ |
| Mozilla Firefox | v52+ |
| Safari | HLS v11+, Dash v17+ |
| Microsoft Edge | v18+ |
| Chromium (Opera, Brave) | v52+ |
Vinyl supports Dash and HLS (fMP4) streaming via MSE on all browsers listed above. Native HLS via FairPlay is supported on Safari and iOS.
Amazon catalog content has DRM requirements to satisfy license agreements. Widevine (used in Chrome / Firefox) uses a VMP ("Verified Media Path") check to ensure the browser's content decryption module is an official, signed version. In most cases this limits playback support to the near-latest browser versions, with exceptions for certain devices with embedded DRM.
| Browser | Support |
|---|---|
| Google Chrome | UHD 192 |
| Mozilla Firefox | UHD 48 (no clearlead) |
| Safari (and iOS) | SD |
| Microsoft Edge | UHD 192 |
| Chromium (Opera, Brave) | UHD 192 |
Support for BigScreen devices such as Comcast, Sky, Samsung, Tizen, LG, and Vizio is coming soon. While in most cases Vinyl will work, some devices have patches that must be applied for consistent playback. Vinyl provides a patching system that allows applying device-specific workarounds to a media proxy, avoiding the need to add conditional complexity to the playback engine.
Extensibility is a key feature of the system, achieved through the use of dependency injection and support for adding custom track types. Dependency injection allows developers to easily swap out components or services, making the system more flexible and adaptable to different needs. Additionally, the ability to add custom track types enables developers to extend the functionality of the playback engine, allowing it to support new service providers, audio formats or specialized processing workflows.
For installation instructions and detailed API documentation, please refer to the VINYL_AMZN_USAGE.md guide.
If you're interested in the vinyl-util package, which offers a collection of
versatile TypeScript utilities, check out its
ReadMe.
https://dev.vinyl.music.amazon.dev/tsdocs/index.html
Refer to DEVELOPER_SETUP.md for contribution guidelines.