|
@@ -27,6 +27,9 @@ if (isset($_GET['comm']) && isset($_GET['rid'])){
|
|
|
.white{
|
|
|
color:white !important;
|
|
|
}
|
|
|
+ ::placeholder{
|
|
|
+ color: white !important;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -37,11 +40,23 @@ if (isset($_GET['comm']) && isset($_GET['rid'])){
|
|
|
<div class="sub white header">Control your remote player here!</div>
|
|
|
</div>
|
|
|
<p class="white">Target RemotePlay ID</p>
|
|
|
+ <div class="ts dropdown" width="100%">
|
|
|
+ <div class="text">
|
|
|
+ <div class="ts fluid input">
|
|
|
+ <input type="text" style="border-top-right-radius: 0px;border-bottom-right-radius: 0px;background-color: black;color: white!important;border-color: white!important" placeholder="RemotePlay ID" id="remoteID_tb">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <i class="caret down icon" style="border: 1px solid white;padding: .78571em 1em;border-radius: .28571rem;background-size: .8em;background-repeat: no-repeat;padding-right: calc(1em + .8em * 1.2);line-height: 1.4385em;border-left: 0px;height: 39.97px;right: 3.2%;border-top-left-radius: 0px;border-bottom-left-radius: 0px;top: 0.4vh;"></i>
|
|
|
+ <div class="menu" style="background-color: black !important;" id="n_remoteID">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--
|
|
|
<div class="ts basic mini fluid input">
|
|
|
<select class="ts basic dropdown" id="remoteID" style="background: black;color: white;width: 100%">
|
|
|
<option>Scanning...</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
+ -->
|
|
|
<p class="white">Volume Control (Min <--> Max)</p>
|
|
|
<div class="ts slider">
|
|
|
<input id="vol" type="range" min="0" max="1" step="0.05" value="0">
|
|
@@ -61,16 +76,47 @@ if (isset($_GET['comm']) && isset($_GET['rid'])){
|
|
|
</div>
|
|
|
<script>
|
|
|
var rid = "";
|
|
|
-ao_module_setWindowSize(1000,340);
|
|
|
-$("#vol").on("change",function(){
|
|
|
- sendCommand("setVol",$(this).val());
|
|
|
+$(document).ready(function(){
|
|
|
+ ao_module_setWindowSize(1000,340);
|
|
|
+ ts('.ts.dropdown:not(.basic)').dropdown();
|
|
|
+ $(".ts.fluid.input").click(function(e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ var h = $(".ts.fluid.input").height();
|
|
|
+ $(".caret.down.icon").attr("style",$(".caret.down.icon").attr("style").replace("39.97",h));
|
|
|
+ var previousRemoteID = ao_module_getStorage("remoteplay","remoteID");
|
|
|
+ $.get("opr.php?opr=scanalive",function(data){
|
|
|
+ var obj = JSON.parse(data);
|
|
|
+ $("#n_remoteID").html("");
|
|
|
+ $("#n_remoteID").append($('<div class="item" style="color: white!important;"></div>').attr("value", "").text("Not selected"));
|
|
|
+ $.each( obj, function( key, value ) {
|
|
|
+ $("#n_remoteID").append($('<div class="item" style="color: white!important;"></div>').attr("value", value).text(value));
|
|
|
+ });
|
|
|
+ $("#n_remoteID").val("");
|
|
|
+ /*
|
|
|
+ if (previousRemoteID !== undefined && $(".item[value='" + previousRemoteID + "']").length > 0){
|
|
|
+ $("#remoteID_tb").val(previousRemoteID);
|
|
|
+ rid = previousRemoteID;
|
|
|
+ }
|
|
|
+ */
|
|
|
+ $("#remoteID_tb").val(previousRemoteID);
|
|
|
+ $("#n_remoteID .item").on("click",function(){
|
|
|
+ //console.log($(this).attr("value"));
|
|
|
+ $("#remoteID_tb").val($(this).attr("value"));
|
|
|
+ ao_module_saveStorage("remoteplay","remoteID",$(this).attr("value"));
|
|
|
+ rid = $(this).attr("value");
|
|
|
+ });
|
|
|
+ $("#remoteID_tb").on("change",function(){
|
|
|
+ ao_module_saveStorage("remoteplay","remoteID",$(this).val());
|
|
|
+ rid = $(this).val();
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
-$("#remoteID").on("change",function(){
|
|
|
- ao_module_saveStorage("remoteplay","remoteID",$(this).val());
|
|
|
- rid = $(this).val();
|
|
|
+$("#vol").on("change",function(){
|
|
|
+ sendCommand("setVol",$(this).val());
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
function play(){
|
|
|
sendCommand("play","");
|
|
|
}
|
|
@@ -141,6 +187,9 @@ function sendCommand(comm,value){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
$(document).ready(function(){
|
|
|
var previousRemoteID = ao_module_getStorage("remoteplay","remoteID");
|
|
|
$.get("opr.php?opr=scanalive",function(data){
|
|
@@ -157,6 +206,7 @@ $(document).ready(function(){
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+*/
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|