Cant get Mic sound to dashboard on iphone

I am trying to make a intercom from a rpi3 to my mobile phone.

I can now get the mic from my USB sound card to play in a normal chrome browser via Node 1.

But I want to have the sound out on my iphone instead.

I can stream a webstream on my iphone with the template node2 with the settings from no3. But how can I get the sound from wav headers into the template node instead of the web stream.???

Get the flow here:

[
    {
        "id": "c61c107a.970a2",
        "type": "wav-headers",
        "z": "e2ac21260485d461",
        "name": "",
        "action": "add",
        "channels": 1,
        "samplerate": 22050,
        "bitwidth": 16,
        "x": 550,
        "y": 400,
        "wires": [
            [
                "2821cc806cab36bf",
                "7597ba6e.5adbb4",
                "a42b8390e64c2830"
            ],
            []
        ]
    },
    {
        "id": "5482134.a222dec",
        "type": "inject",
        "z": "e2ac21260485d461",
        "name": "record",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 120,
        "y": 380,
        "wires": [
            [
                "2852077b.af8aa8"
            ]
        ]
    },
    {
        "id": "363b5caf.bf44c4",
        "type": "inject",
        "z": "e2ac21260485d461",
        "name": "stop",
        "repeat": "",
        "crontab": "",
        "once": false,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 120,
        "y": 420,
        "wires": [
            [
                "2852077b.af8aa8"
            ]
        ]
    },
    {
        "id": "2852077b.af8aa8",
        "type": "microphone",
        "z": "e2ac21260485d461",
        "name": "microphone",
        "endian": "little",
        "bitwidth": "16",
        "encoding": "signed-integer",
        "channels": "1",
        "rate": "22050",
        "silence": "60",
        "debug": false,
        "active": true,
        "x": 350,
        "y": 360,
        "wires": [
            [
                "c61c107a.970a2",
                "ef0b38f65d9d07e1"
            ]
        ]
    },
    {
        "id": "7597ba6e.5adbb4",
        "type": "ui_audio",
        "z": "e2ac21260485d461",
        "name": "Audio out only works on pc browser not iphone",
        "group": "180d570c.93b059",
        "voice": "0",
        "always": false,
        "x": 940,
        "y": 360,
        "wires": []
    },
    {
        "id": "3396d4d3214f3a2e",
        "type": "ui_button",
        "z": "e2ac21260485d461",
        "name": "",
        "group": "180d570c.93b059",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Sart web stream",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 980,
        "y": 500,
        "wires": [
            [
                "cf9ae85f9df7fbdd"
            ]
        ]
    },
    {
        "id": "cf9ae85f9df7fbdd",
        "type": "ui_template",
        "z": "e2ac21260485d461",
        "group": "180d570c.93b059",
        "name": "Sound out works on iphone",
        "order": 1,
        "width": "3",
        "height": "1",
        "format": "<script>\n$('button').click(function() {   new Audio (\"http://stream.vinylhits.dk/vinylmp3\").play();\n})\n</script>\n ",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 1340,
        "y": 460,
        "wires": [
            [
                "c19e65fab785455b"
            ]
        ]
    },
    {
        "id": "ef0b38f65d9d07e1",
        "type": "debug",
        "z": "e2ac21260485d461",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 510,
        "y": 280,
        "wires": []
    },
    {
        "id": "2821cc806cab36bf",
        "type": "debug",
        "z": "e2ac21260485d461",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 300,
        "wires": []
    },
    {
        "id": "c19e65fab785455b",
        "type": "debug",
        "z": "e2ac21260485d461",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1590,
        "y": 460,
        "wires": []
    },
    {
        "id": "a42b8390e64c2830",
        "type": "wav-filewriter",
        "z": "e2ac21260485d461",
        "name": "",
        "path": "/home/pi/intercom/demo.wav",
        "mode": "700",
        "x": 870,
        "y": 420,
        "wires": [
            [
                "cf9ae85f9df7fbdd"
            ]
        ]
    },
    {
        "id": "180d570c.93b059",
        "type": "ui_group",
        "name": "Devices",
        "tab": "493cf398.76af9c",
        "order": 2,
        "disp": false,
        "width": "6"
    },
    {
        "id": "493cf398.76af9c",
        "type": "ui_tab",
        "name": "Ratby Road",
        "icon": "dashboard"
    }
]

Pages can't auto play audio without a human interaction these days iirc

Well that’s not completely right because the node2 plays the streams with no touch on the screen.
Unless I misunderstand you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.