Fire HD 10 - Control Volume Via SharpTools?

Based on our other conversations, it sounds like you are a web developer and are pretty familiar with building Custom Tiles. You could create a tile that allows adjusting the volume using the Fully Kiosk JavaScript API

Fully Kiosk Browser settings → Advanced Web Settings → Enable JavaScript API

For example, here’s a test tile I put together as I was trying to figure out what the right stream was for controlling the volume on my Fire tablet:

You can tap on the volume or channel in the sample tile and it increments each respectively and then plays a TTS message so you can test the volume changed as expected. It should at least give you the bones to get a feel for how things work, but feel free to ask questions. :slight_smile:

<script src="https://unpkg.com/vue@next"></script>

<div id="app">
  <div v-on:click="incrementVolume">Volume: {{ volume }}</div>
  <div v-on:click="incrementChannel">Channel: {{ channel }}</div>
</div>



<script>
  const VolumeApp = {
    data() {
      return {
        volume: 20,
        channel: 1,
      }
    },
    methods: {
      incrementVolume(){
        if(this.volume === 100){
          this.volume = 0;
          return;
        }
        this.volume = Math.min(this.volume + 10, 100);
        this.setVolume(this.volume);
      },
      setVolume(level){
        if(window.fully == null){ 
          alert('Please enable JS API in Fully Kiosk Browser')
          return;
        }
        window.fully.setAudioVolume(this.volume, this.channel)
        window.fully.stopTextToSpeech()
        window.fully.textToSpeech(`Testing channel ${this.channel} at volume ${this.volume}`);
      },
      incrementChannel(){
        if(this.channel === 10){
          this.channel = 0;
          return;
        }
        this.channel = Math.min(this.channel + 1, 10);
        this.setVolume(this.volume);
      }
    },
    mounted(){
      window.fully.getAudioVolume
    }
  }

Vue.createApp(VolumeApp).mount('#app')
  
</script>

<style>
  #app { 
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-evenly;
  }
  #app > * { 
    flex: 1;
    padding: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  html, body { height: 100%; margin: 0;}
  
</style>

This is what the channels are supposed to be, but only 3 and 8 seemed to adjust the volume as expected on my fire tablet.

["1":"System","2":"Ring","3":"Music","4":"Alarm","5":"Notification","6":"Bluetooth","7":"System Enforced","8":"DTMF","9":"TTS","10":"Accessibility"],
1 Like