Skip to content

Commit

Permalink
JustAudio compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Larpoux committed Sep 28, 2021
1 parent c36ed4d commit ae9f1ec
Showing 45 changed files with 58 additions and 647 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
@@ -194,7 +194,6 @@ if [ $? -ne 0 ]; then
fi

cd ../..
exit 0

bin/doc.sh $VERSION

4 changes: 2 additions & 2 deletions bin/doc.sh
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ fi
# tau_web
# -------

cd tau_sound/example
flutter build web
#cd tau_sound/example
#flutter build web


cp privacy_policy.html doc/_site
39 changes: 20 additions & 19 deletions bin/doc2.sh
Original file line number Diff line number Diff line change
@@ -16,13 +16,29 @@ cd



cp -a /tmp/toto_doc/api /tmp/toto_doc/_site/pages/tau-sound/api

echo "Building Jekyll doc"
cd /tmp/toto_doc
rm home.md 2>/dev/null
rm -rf /tmp/toto_doc/tau_sound/example/ios/Pods
bundle config set --local path '~/vendor/bundle'
bundle install
bundle exec jekyll build
if [ $? -ne 0 ]; then
echo "Error"
exit -1
fi


cd
echo "patch css for Jekyll compatigility"

sed -i "0,/^ overflow: hidden;$/s//overflow: auto;/" /tmp/toto_doc/_site/pages/tau-sound/api/static-assets/styles.css
sed -i "s/^ background-color: inherit;$/ background-color: #2196F3;/" /tmp/toto_doc/_site/pages/tau-sound/api/static-assets/styles.css

echo "Add Front matter on top of dartdoc pages"
for f in $(find /tmp/toto_doc/_site/pages/flutter-sound/api -name '*.html' )
for f in $(find /tmp/toto_doc/_site/pages/tau-sound/api -name '*.html' )
do
sed -i "1i ---" $f
#gsed -i "1i toc: false" $f
@@ -31,22 +47,7 @@ do
sed -i "/^<script src=\"https:\/\/ajax\.googleapis\.com\/ajax\/libs\/jquery\/3\.2\.1\/jquery\.min\.js\"><\/script>$/d" $f
done




echo "Building Jekyll doc"
cd /tmp/toto_doc
rm home.md 2>/dev/null
bundle config set --local path '~/vendor/bundle'
bundle install
bundle exec jekyll build
if [ $? -ne 0 ]; then
echo "Error"
exit -1
fi

cp -a /tmp/toto_doc/api /tmp/toto_doc/_site/pages/tau-sound/api

cd

echo "Symbolic links"
#FILES=*
@@ -87,6 +88,6 @@ if [ $? -ne 0 ]; then
fi
cd

rm -rf /var/www/vhosts/canardoux.xyz/tau.canardoux.xyz/web_example/
rm -rf /var/www/vhosts/canardoux.xyz/tau10.canardoux.xyz/web_example/
cp -a /tmp/toto_doc/tau_sound/example/assets/samples/ /tmp/toto_doc/tau_sound/example/assets/extract /tmp/toto_doc/tau_sound/example/build/web/assets
cp -a /tmp/toto_doc/tau_sound/example/build/web /var/www/vhosts/canardoux.xyz/tau.canardoux.xyz/web_example
cp -a /tmp/toto_doc/tau_sound/example/build/web /var/www/vhosts/canardoux.xyz/tau10.canardoux.xyz/web_example
595 changes: 2 additions & 593 deletions doc/CHANGELOG.md

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tau_native
Binary file modified tau_platform_interface/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions tau_platform_interface/lib/method_channel_tau_player.dart
Original file line number Diff line number Diff line change
@@ -39,14 +39,13 @@ class MethodChannelTauPlayer extends TauPlayerPlatform



/* ctor */ MethodChannelTauSoundPlayer()
/* ctor */ MethodChannelTauPlayer()
{
setCallback();
}

void setCallback()
{
//_channel = const MethodChannel('com.dooboolab.flutter_sound_player');
_channel.setMethodCallHandler((MethodCall call)
{
return channelMethodCallHandler(call)!;
4 changes: 2 additions & 2 deletions tau_sound/android/build.gradle
Original file line number Diff line number Diff line change
@@ -54,8 +54,8 @@ dependencies {
// -------------------------------------------------------------------------------------
// CAUTION: The following instruction is for developping and debugging the Flauto Engine
// DO NOT INCLUDE THE FOLLOWING LINE IN A REAL APP !!!
//implementation project(':tau_native')
implementation 'com.github.canardoux:tau_native:0.0.1-alpha-4'
implementation project(':tau_native')
//implementation 'com.github.canardoux:tau_native:0.0.1-alpha-4'
// -------------------------------------------------------------------------------------

}
2 changes: 1 addition & 1 deletion tau_sound/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@ rootProject.name = 'tau_sound_lite'
// -------------------------------------------------------------------------------------
// CAUTION: The following instruction is for developping and debugging the Flauto Engine
// DO NOT INCLUDE THE FOLLOWING LINES IN A REAL APP !!!
//project(':tau_native').projectDir = file('/Volumes/Home/larpoux/projmac/tau/tau_native/android')
project(':tau_native').projectDir = file('/Volumes/Home/larpoux/projmac/tau/tau_native/android')
// -------------------------------------------------------------------------------------

Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ public static void attachFlautoPlayer (
if (TauSoundPlayerPlugin == null) {
TauSoundPlayerPlugin = new TauSoundPlayerManager();
}
MethodChannel channel = new MethodChannel ( messenger, "com.dooboolab.flutter_sound_player" );
MethodChannel channel = new MethodChannel ( messenger, "xyz.canardoux.tau_player" );
TauSoundPlayerPlugin.init(channel);
channel.setMethodCallHandler ( TauSoundPlayerPlugin );
androidContext = ctx;
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public static void attachFlautoRecorder ( Context ctx, BinaryMessenger messenger
if (TauSoundRecorderPlugin == null) {
TauSoundRecorderPlugin = new TauSoundRecorderManager();
}
MethodChannel channel = new MethodChannel ( messenger, "com.dooboolab.flutter_sound_recorder" );
MethodChannel channel = new MethodChannel ( messenger, "xyz.canardoux.tau_recorder" );
TauSoundRecorderPlugin.init( channel);
channel.setMethodCallHandler ( TauSoundRecorderPlugin );
androidContext = ctx;
2 changes: 1 addition & 1 deletion tau_sound/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ dependencies {
// -------------------------------------------------------------------------------------
// CAUTION: The following instruction is for developping and debugging the Flauto Engine
// DO NOT INCLUDE THE FOLLOWING LINE IN A REAL APP !!!
// implementation project(':tau_native')
implementation project(':tau_native')
// -------------------------------------------------------------------------------------

//apply plugin: 'maven'
4 changes: 2 additions & 2 deletions tau_sound/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ plugins.each { name, path ->
// -------------------------------------------------------------------------------------
// CAUTION: The following instruction is for developping and debugging the Flauto Engine
// DO NOT INCLUDE THE FOLLOWING LINES IN A REAL APP !!!
// include 'tau_native'
// project(':tau_native').projectDir = file('../../../tau_native/android')
include 'tau_native'
project(':tau_native').projectDir = file('../../../tau_native/android')
// -------------------------------------------------------------------------------------


2 changes: 1 addition & 1 deletion tau_sound/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -44,5 +44,5 @@ end
# =====================================================
# The following instruction is only for Tau debugging.
# Do not insert such a line in a real App.
# pod 'tau_native', :path => '../../../tau_native'
pod 'tau_native', :path => '../../../tau_native'
# =====================================================
3 changes: 2 additions & 1 deletion tau_sound/example/lib/simple_recorder/simple_recorder.dart
Original file line number Diff line number Diff line change
@@ -67,7 +67,8 @@ class _SimpleRecorderState extends State<SimpleRecorder> {
bool _mplaybackReady = false;

@override
void initState() {
void initState()
{
_mPlayer!.open().then((value) {
setState(() {
_mPlayerIsInited = true;
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ class _StreamLoopJustAudioState extends State<StreamLoopJustAudio> {
Future<void> init() async {
await _mRecorder!.open();
await _mPlayer!.open();
await _player.setUrl(_exampleAudioFilePathMP3);
//await _player.setUrl(_exampleAudioFilePathMP3);
}

@override
@@ -146,8 +146,9 @@ class _StreamLoopJustAudioState extends State<StreamLoopJustAudio> {
return _mRecorder!.isRecording ? stop : record;
}

void justAudio() {
_player.play();
void justAudio() async {
await _player.setUrl(_exampleAudioFilePathMP3);
await _player.play();
}
// ----------------------------------------------------------------------------------------------------------------------

15 changes: 8 additions & 7 deletions tau_sound/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -24,12 +24,12 @@ dependencies:
# ============================================================================
# The following instructions are just for developing/debugging Flutter Sound
# Do not put them in a real App
# tau_platform_interface: 0.0.1-alpha-6+1
# path: ../../tau_platform_interface # tau_platform_interface Dir
# tau_web: 0.0.1-alpha-6+1
# path: ../../tau_web # tau_web Dir
tau_sound: ^0.0.1-alpha-6+1
# path: ../ # Flutter Sound Dir
tau_platform_interface: # 0.0.1-alpha-6+1
path: ../../tau_platform_interface # tau_platform_interface Dir
tau_web: # 0.0.1-alpha-6+1
path: ../../tau_web # tau_web Dir
tau_sound: # ^0.0.1-alpha-6+1
path: ../ # Flutter Sound Dir
# ============================================================================


@@ -39,7 +39,8 @@ dependencies:
path: ^1.6.4
#### flutter_ffmpeg: ^0.4.2
intl: ^0.17.0
just_audio: ^0.9.11
just_audio: # ^0.9.11
path: ../../../just_audio/just_audio



2 changes: 1 addition & 1 deletion tau_sound/ios/Classes/FlutterSoundPlayerManager.mm
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ @implementation FlutterSoundPlayerManager

+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar
{
FlutterMethodChannel* aChannel = [FlutterMethodChannel methodChannelWithName:@"com.dooboolab.flutter_sound_player"
FlutterMethodChannel* aChannel = [FlutterMethodChannel methodChannelWithName:@"xyz.canardoux.tau_player"
binaryMessenger:[registrar messenger]];
if (flutterSoundPlayerManager != nil)
{
2 changes: 1 addition & 1 deletion tau_sound/ios/Classes/FlutterSoundRecorderManager.mm
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ @implementation FlutterSoundRecorderManager

+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar
{
FlutterMethodChannel* aChannel = [FlutterMethodChannel methodChannelWithName:@"com.dooboolab.flutter_sound_recorder"
FlutterMethodChannel* aChannel = [FlutterMethodChannel methodChannelWithName:@"xyz.canardoux.tau_recorder"
binaryMessenger:[registrar messenger]];
if (flutterSoundRecorderManager != nil)
NSLog(@"ERROR during registerWithRegistrar: flutterSoundRecorderManager != nil");
2 changes: 1 addition & 1 deletion tau_sound/lib/public/tau_codec.dart
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@

/// Flutter Sound Input nodes
/// {@category Main}
library node;
library codec;

import 'dart:core';
import 'package:tau_platform_interface/tau_platform_interface.dart';
8 changes: 4 additions & 4 deletions tau_sound/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ dependencies:
sdk: flutter
flutter_ffmpeg: ^0.4.2
# ============================================================================
tau_platform_interface: 0.0.1-alpha-6+1
# path: ../tau_platform_interface # Flutter Sound Dir
tau_web: 0.0.1-alpha-6+1
# path: ../tau_web # Flutter Sound Dir
tau_platform_interface: # 0.0.1-alpha-6+1
path: ../tau_platform_interface # Flutter Sound Dir
tau_web: # 0.0.1-alpha-6+1
path: ../tau_web # Flutter Sound Dir
# ============================================================================

dev_dependencies:
Binary file modified tau_web/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions tau_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ flutter:


dependencies:
tau_platform_interface: 0.0.1-alpha-6+1
# path: ../tau_platform_interface # Flutter Sound Dir
tau_platform_interface: # 0.0.1-alpha-6+1
path: ../tau_platform_interface # Flutter Sound Dir
flutter:
sdk: flutter
logger: ^1.0.0

0 comments on commit ae9f1ec

Please sign in to comment.