Discussions
Activity
Sign In
How it works
Airtime Development
Bug on stream bitrate value disable/enable option after OGG/MP3 selection in Chrome - with solution
Vote Up
0
Vote Down
Hidayat Febiansyah
October 2012
Posts: 1
Member
Hi,
Thank you for building this remarkable application.
After finally managed to get the system up well, in the stream bitrate setting page, there was a bug I found.
At first, I thought 24 and 32 kbps were disabled from the system setting since the beginning (spending 2 hours messing with the codes).
However, I found out finally that the problem lie on the javascript (specifically running in chrome browser).
At init, 24 and 32 kbps were disabled, then when the "MP3" stream type is selected, then both will be enable, yet it never happened.
In /js/airtime/preferences/streamsetting.js , there is a function:
function restrictOggBitrate(ele, on){
var div = ele.closest("div");
if(on){
...
}else{
div.find("select[id$=data-bitrate]").find("option[value='24']").
attr("disabled","");
div.find("select[id$=data-bitrate]").find("option[value='32']").
attr("disabled","");
}
}
as we can see, the "disabled" attribute was set to "". It was not working well in chrome. So i modified the code to:
function restrictOggBitrate(ele, on){
var div = ele.closest("div");
if(on){
...
}else{
div.find("select[id$=data-bitrate]").find("option[value='24']").removeAttr("disabled");
div.find("select[id$=data-bitrate]").find("option[value='32']").removeAttr("disabled");
}
}
using "removeAttr", finally it works well.
I think that's all as my story and suggestion. Hope it helps.
~reference:
http://jquery-howto.blogspot.kr/2008/12/how-to-disableenable-element-with.html
Regards,
NB: attached modified script
streamsetting.js
12K
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339