-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from psu-stewardship/audio
Fixing audio player disiplay on firefox and safari so the HTML5 audio ta...
- Loading branch information
Showing
5 changed files
with
40 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
function initialize_audio() { | ||
|
||
var test_audio= document.createElement("audio") //try and create sample audio element | ||
var audiosupport= (test_audio.play)? true : false | ||
|
||
if (audiosupport){ | ||
$('audio').each(function() { | ||
this.controls = true; | ||
}); | ||
}else { | ||
$('audio').each(function() { | ||
$(this).attr("preload","auto"); | ||
}); | ||
audiojs.events.ready(function() { | ||
var as = audiojs.createAll({ | ||
imageLocation: '/assets/player-graphics.gif', | ||
swfLocation: '/assets/audiojs.swf' | ||
}); | ||
|
||
// remove html 5 player from veiw on firefox and safari | ||
$('.audiojs').addClass('no-audio-background') | ||
$('.audiojs .play-pause').addClass('hide') | ||
$('.audiojs .scrubber').addClass('hide') | ||
$('.audiojs .time').addClass('hide') | ||
|
||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
.no-audio-background { | ||
background: none; | ||
box-shadow: none; | ||
} | ||
|
||
.span40 .audiojs audio { | ||
left: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters