goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.87k stars 2.23k forks source link

Support for DASH streaming #1692

Open somebadhat opened 11 months ago

somebadhat commented 11 months ago

Feature Proposal

@goldfire Screen Shot 001 Thanks for howler.js I use howler.js to listen to live audio streams.

The BBC has stopped supporting Shoutcast except for The World Service BBC4 for listeners outside the UK.

The BBC is changing the way they stream content to DASH.

A DASH manifest file: http://a.files.bbci.co.uk/ms6/live/3441A116-B12E-4D2F-ACA8-C1984642FA4B/audio/simulcast/dash/nonuk/pc_hd_abr_v2/ak/bbc_6music.mpd

The manifest:

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:dvb="urn:dvb:dash:dash-extensions:2014-1"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="dynamic" availabilityStartTime="1969-12-31T23:59:44Z"
  minimumUpdatePeriod="PT6H" timeShiftBufferDepth="PT6H" maxSegmentDuration="PT7S" minBufferTime="PT3.200S"
  profiles="urn:dvb:dash:profile:dvb-dash:2014,urn:dvb:dash:profile:dvb-dash:isoff-ext-live:2014"
  publishTime="2023-09-04T15:44:10">

<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="https://time.akamai.com/?iso" />

<BaseURL dvb:priority="1" dvb:weight="1" serviceLocation="aks">https://as-dash-ww-live.akamaized.net/pool_904/live/ww/bbc_6music/bbc_6music.isml/dash/</BaseURL>

<Period id="1" start="PT0S">
<AdaptationSet group="1" contentType="audio" lang="en" minBandwidth="48000" maxBandwidth="96000"
               segmentAlignment="true" audioSamplingRate="48000" mimeType="audio/mp4" codecs="mp4a.40.5" startWithSAP="1">
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
    <SegmentTemplate timescale="48000" initialization="bbc_6music-$RepresentationID$.dash"
                   media="bbc_6music-$RepresentationID$-$Number$.m4s" startNumber="1" duration="307200"/>
    <Representation id="audio=48000" bandwidth="48000"/>
    <Representation id="audio=96000" bandwidth="96000"/>
</AdaptationSet>

</Period>
</MPD>