how to disable html audio player playback speed - audio

I don't want to show playback speed in my audio
I use this method
controlslist="nodownload noplaybackrate"
<audio id="recordedAudio" controls controlslist="nodownload noplaybackrate"
src="https://www.zapsplat.com/wp-content/uploads/2015/sound-effects-61905/zapsplat_multimedia_alert_chime_short_musical_notification_cute_child_like_001_64918.mp3?_=1"></audio>

Related

Is there any javascript library for making a reminder website with alarm sound

I am trying to build a web-app for reminding me for doing a certain task with sound alarm.
You could use html5 audio tag and jquery:
// appending HTML5 Audio Tag in HTML Body
$('<audio id="chatAudio">
<source src="notify.ogg" type="audio/ogg">
<source src="notify.mp3" type="audio/mpeg">
</audio>').appendTo('body');
// play sound
$('#chatAudio')[0].play();
link
or a simple <audio> tag
You could also use the moment library for date-time functions.
https://momentjs.com/ to call the above function.

medialement.js not working for my hls on iphone

Here is my m3u8 file:
cat 8.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-MEDIA-SEQUENCE:1131
#EXT-X-TARGETDURATION:5
#EXTINF:4.950, no desc
1545049888215.ts
#EXTINF:4.950, no desc
1545049893218.ts
I serve it at as static file at http://104.248.205.68:31339/8.m3u8
I use mediaelemnts.js to run this hls video: jsfiddle
html:
<video width="240" height="160"
id="player1" src="http://104.248.205.68:31339/8.m3u8"
controls="controls" autoplay preload="auto" muted ></video>
js:
$('video').mediaelementplayer({});
It works fine on chrome mac os desktop. But not working on iphone 8+ (safari and chrome). No errors in the console. Video just not played, black screen. In the fullscreen mode of video - the same.
At the same time, if I find a random m3u8 on the internet and use mediaelemnts.js to play it, it works well on the iPhone (at least in fullscreen mode) jsfiddle 2.
So I guess something wrong with my m3u8 file since other m3u8s are runnable on the iPhone.
If I open network tab while loading the problem page on Iphone, I see it's downloading the files but not showing video for some reason.
Update
I checked on android: galaxy s5 and galaxy s9+ in chrome: both works.
Update 2
Zip archive with ts files and m3u8: http://104.248.205.68:31339/8.m3u8.zip
When inspecting the media files [1] it can be found that the PMT (Program Map Table) signals that there is audio in the stream, but there are actually no TS packets for audio (i.e. no audio data) present.
It looks like the player waits for the audio TS packets in order to build a common buffer for both, audio and video, and only then start playback. Since the stream lacks audio data that never happens. To back that up, you can use ffmpeg to remove the audio track from the media segments using the below command and find that playback would work once you do this.
ffmpeg -i 1545049893218.ts -an -vcodec copy 1545049893218-v.ts
Further, the reason this problem only manifests in Safari and Chrome on iOS is that in those cases mediaelement.js is using the browser's native capabilities to play HLS, instead of a JavaScript player (like hls.js) which is used on other platforms (e.g. Chrome on desktop) and is more tolerant to such problem cases.
[1] E.g. using http://thumb.co.il/ or ffprobe
EDIT:
While the above may be sufficient to make it work on older Apple mobile devices - I tested on iPhone 6 iOS10 - newer devices seem to be more restrictive. The official HLS Authoring Spec states
8.11. You MUST provide at least 6 segments in a live/linear playlist.
which does not seem to be a hard requirement on some iOS versions. However, to ensure it to be working on all versions these requirements should be met.
I did a quick test on iPhone X with iOS12 and found it would play if at least 3 segments are provided in the playlist by just duplicating the last segment entry.

Use only audio track from video stream

I am using Wowza Engine where I have some video streams, live and on-demand files. I use HLS and RTMP streaming. The issue is that for some clients I would like to offer only the audio track, not the audio+video.
I think I can do that using the transcoding module of Wowza, but I would like to know if there is a simpler way of doing this. I do not know maybe using a special smil, or prefix.
You can specify an audio track by using the audio index. To play back the first track, add "audioindex=0" to the stream name and URL.
For VOD RTMP example, Stream: mp4:myStream.mp4?audioindex=0
HLS playback URL:
http://[wowza-server-ip-address]:1935/[app-name]/mp4:myStream.mp4/playlist.m3u8?audioindex=0
For ABR delivery, you can add a line for an audio only rendition using the audioOnly parameter in the SMIL file. The value of the system-bitrate is the total bitrate in bits/second. For a live SMIL file example,
<smil>
<head>
</head>
<body>
<switch>
<video src="hi-stream” system-bitrate="500000"/>
<video src=“low-stream” system-bitrate=“250000”>
<video src="low-stream” system-bitrate="64000">
<param name="audioOnly" value="TRUE" valuetype="data"/>
</video>
</switch>
</body>
</smil>
HLS playback URL:
http://[wowza-server-ip-address]:1935/[app-name]/smil:[smil-name].smil/playlist.m3u8
HLS playback URL for testing the audio only rendition:
http://[wowza-server-ip-address]:1935/[app-name]/[stream-name]/playlist.m3u8?wowzaaudioonly

Size of video container in receiver

I know this is ridiculous, but I'm learning...
In a Chrome application I let my sender initiate and load a Custom receiver.
The receiver page includes a video element set to play one specific video, like this:
<video autoplay>
<source src="../media/someVideo.mp4" type="video/mp4">
</video>
The receiver page and the media file are hosted on a web server (SP)
I use no further communication between sender and receiver, so the receiver just loads and plays the video.
It works beautifully, but the video size on the device (TV) is too big. It fills the screen, but I don't see the full picture.
I try to downsize the video using CSS or by setting the width and height parameters on the video element, but the result is the same. Why doesn't ChromeCast respect these settings?
width/height for the video element should work. As a test, just set width and height in the element itself and test. On a tv screen, in general, there is a notion of overscan and most modern tv sets have a setting to adjust that, you might want to check to see if your tv offers that too or not.

Embed audio to save bandwidth? To embed or stream?

<audio controls>
<source src="/audio/{$link_data.ID}.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
I have a mix of text like pages in a book, images and audio on my website. When you move from page to page a new mp3 is being loaded and sometimes images.
Sometimes people only read the text or play the audio or a mix of the two.
I was wondering what the best way is to have the audio available without it downloading (on each new page). By being available I mean that you would press the play button before it started to stream the audio.
Just set preload="none".
<audio controls preload="none">
The media will not begin downloading until requested by the user.
Reference:
http://www.w3.org/TR/html-markup/audio.html#audio.attrs.preload

Resources