Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/common-app/src/examples/AudioTag/AudioTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { AudioContext, BiquadFilterNode, MediaElementAudioSourceNode } from 'rea
import { Button, Container, Slider, Spacer } from '../../components';

// const DEMO_AUDIO_URL = 'https://filesamples.com/samples/audio/m4a/sample4.m4a';
const DEMO_AUDIO_URL = 'https://filesamples.com/samples/audio/mp3/sample4.mp3';
const DEMO_AUDIO_URL = 'https://liveradio.timesa.pl/2980-1.aac/playlist.m3u8';
// const DEMO_AUDIO_URL = 'https://filesamples.com/samples/audio/mp3/sample4.mp3';

const AudioTag: React.FC = () => {
const { width: screenWidth } = useWindowDimensions();
Expand Down
4 changes: 3 additions & 1 deletion apps/common-app/src/examples/Streaming/Streaming.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const Streaming: FC = () => {
console.error('StreamerNode is already initialized');
return;
}
streamerRef.current = aCtxRef.current.createStreamer('https://liveradio.timesa.pl/2980-1.aac/playlist.m3u8');
streamerRef.current = aCtxRef.current.createStreamer(
'https://liveradio.timesa.pl/2980-1.aac/playlist.m3u8'
);

streamerRef.current.connect(gainRef.current);
gainRef.current.connect(aCtxRef.current.destination);
Expand Down
6 changes: 3 additions & 3 deletions apps/fabric-example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FBLazyVector: c00c20551d40126351a6783c47ce75f5b374851b
hermes-engine: 91023181d4bc5948b457de5314623fbfe4f8604e
hermes-engine: 146211e12d60a1951d9eb0287be07211e86cf5d5
RCTDeprecation: 3bb167081b134461cfeb875ff7ae1945f8635257
RCTRequired: 74839f55d5058a133a0bc4569b0afec750957f64
RCTSwiftUI: 87a316382f3eab4dd13d2a0d0fd2adcce917361a
Expand All @@ -2485,7 +2485,7 @@ SPEC CHECKSUMS:
React: 1b1536b9099195944034e65b1830f463caaa8390
React-callinvoker: 6dff6d17d1d6cc8fdf85468a649bafed473c65f5
React-Core: 00faa4d038298089a1d5a5b21dde8660c4f0820d
React-Core-prebuilt: a6d614de037caff7898424dfc22915ec792de921
React-Core-prebuilt: ef40616103ee11f8c2517697c3aa4f48ce790549
React-CoreModules: a17807f849bfd86045b0b9a75ec8c19373b482f6
React-cxxreact: c7b53ace5827be54048288bce5c55f337c41e95f
React-debug: e1f00fcd2cef58a2897471a6d76a4ef5f5f90c74
Expand Down Expand Up @@ -2549,7 +2549,7 @@ SPEC CHECKSUMS:
ReactAppDependencyProvider: 5787b37b8e2e51dfeab697ec031cc7c4080dcea2
ReactCodegen: d07ee3c8db75b43d1cbe479ae6affebf9925c733
ReactCommon: fe2a3af8975e63efa60f95fca8c34dc85deee360
ReactNativeDependencies: 4d5ce2683b6d74f7c686bf90a88c7d381295cf3c
ReactNativeDependencies: 54189f1570b1308686cb21564e755e1daa77ea03
RNAudioAPI: 6668f71bdd9850005984acf39a3daef4935cec02
RNGestureHandler: 187c5c7936abf427bc4d22d6c3b1ac80ad1f63c0
RNReanimated: 64f4b3b33b48b19e0ba76a352571b52b1e931981
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <audioapi/HostObjects/sources/AudioFileSourceNodeHostObject.h>

#include <audioapi/HostObjects/sources/AudioScheduledSourceNodeHostObject.h>
#include <audioapi/core/BaseAudioContext.h>
#include <audioapi/core/sources/AudioFileSourceNode.h>
#include <audioapi/types/NodeOptions.h>
#include <memory>
#include <utility>
#include "audioapi/HostObjects/sources/AudioScheduledSourceNodeHostObject.h"

namespace audioapi {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <audioapi/jsi/RuntimeLifecycleMonitor.h>
#include <jsi/jsi.h>
#include <cstddef>
#include <cstdio>
#include <memory>
#include <vector>

Expand Down Expand Up @@ -297,7 +298,7 @@ inline AudioFileSourceOptions parseAudioFileSourceOptions(

auto loopValue = optionsObject.getProperty(runtime, "loop");
if (loopValue.isBool()) {
options.loop = static_cast<bool>(loopValue.getBool());
options.loop = loopValue.getBool();
}

auto volumeValue = optionsObject.getProperty(runtime, "volume");
Expand All @@ -309,16 +310,16 @@ inline AudioFileSourceOptions parseAudioFileSourceOptions(
if (sourceValue.isString()) {
options.filePath = sourceValue.asString(runtime).utf8(runtime);
options.requiresFFmpeg =
audiodecoding::pathHasExtension(options.filePath, {".mp4", ".m4a", ".aac"});
audiodecoding::pathHasExtension(options.filePath, {".mp4", ".m4a", ".aac", ".m3u8"});
} else if (sourceValue.isObject()) {
auto sourceObj = sourceValue.asObject(runtime);
if (sourceObj.isArrayBuffer(runtime)) {
auto arrayBuffer = sourceObj.getArrayBuffer(runtime);
auto *data = arrayBuffer.data(runtime);
auto size = arrayBuffer.size(runtime);
auto format = audiodecoding::detectAudioFormat(data, size);
options.requiresFFmpeg =
format == AudioFormat::MP4 || format == AudioFormat::M4A || format == AudioFormat::AAC;
options.requiresFFmpeg = format == AudioFormat::MP4 || format == AudioFormat::M4A ||
format == AudioFormat::AAC || format == AudioFormat::M3U8;
options.data = std::vector<uint8_t>(data, data + size);
}
}
Expand Down
Loading
Loading