@@ -709,6 +709,15 @@ exports.defineManualTests = function (contentEl, createActionButton) {
709
709
} ) ;
710
710
}
711
711
712
+ //set audio volume
713
+ function setVolume ( ) {
714
+ console . log ( "setVolume()" ) ;
715
+ var volume = document . getElementById ( "volumeInput" ) . value ;
716
+ if ( media1 !== null ) {
717
+ media1 . setVolume ( volume ) ;
718
+ }
719
+ }
720
+
712
721
//for forced updates of position after a successful seek
713
722
714
723
function updatePosition ( ) {
@@ -970,6 +979,24 @@ exports.defineManualTests = function (contentEl, createActionButton) {
970
979
row :0 ,
971
980
cell :2
972
981
}
982
+ } ,
983
+ {
984
+ id : "setVolumeBtn" ,
985
+ content : "" ,
986
+ tag : "div" ,
987
+ position : {
988
+ row : 3 ,
989
+ cell : 0
990
+ }
991
+ } ,
992
+ {
993
+ id : "volumeInput" ,
994
+ tag : "input" ,
995
+ type : "text" ,
996
+ position : {
997
+ row : 3 ,
998
+ cell : 1
999
+ }
973
1000
}
974
1001
] ,
975
1002
elementsRecord =
@@ -1022,7 +1049,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
1022
1049
div . setAttribute ( "align" , "center" ) ;
1023
1050
contentEl . appendChild ( div ) ;
1024
1051
//Generate and add buttons table
1025
- contentEl . appendChild ( generateTable ( 'audioActions' , 3 , 3 , elementsAudio ) ) ;
1052
+ contentEl . appendChild ( generateTable ( 'audioActions' , 4 , 3 , elementsAudio ) ) ;
1026
1053
createActionButton ( 'Play' , function ( ) {
1027
1054
playAudio ( ) ;
1028
1055
} , 'playBtn' ) ;
@@ -1055,6 +1082,9 @@ exports.defineManualTests = function (contentEl, createActionButton) {
1055
1082
createActionButton ( 'Seek To' , function ( ) {
1056
1083
seekAudio ( 'to' ) ;
1057
1084
} , 'seekToBtn' ) ;
1085
+ createActionButton ( 'Set volume' , function ( ) {
1086
+ setVolume ( ) ;
1087
+ } , 'setVolumeBtn' ) ;
1058
1088
//get Special path to record if iOS || Blackberry
1059
1089
if ( cordova . platformId === 'ios' )
1060
1090
getRecordSrc ( ) ;
0 commit comments