@robono/messaging-react-native 0.26.3 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/SBOM.spdx.json +1696 -616
- package/app.plugin.cjs +4 -0
- package/dist/bubble-design.d.ts +1 -0
- package/dist/bubble-design.js +1 -0
- package/dist/call-message-decoration.d.ts +15 -0
- package/dist/call-message-decoration.js +23 -0
- package/dist/calling-timeline.d.ts +40 -0
- package/dist/calling-timeline.js +79 -0
- package/dist/calling.d.ts +4 -1
- package/dist/calling.js +8 -5
- package/dist/expo-connected-calling.d.ts +4 -0
- package/dist/expo-connected-calling.js +3 -1
- package/dist/expo-messenger.d.ts +10 -0
- package/dist/expo-messenger.js +7 -1
- package/dist/expo-reviews.js +1 -1
- package/dist/expo-screen.d.ts +32 -0
- package/dist/expo-screen.js +93 -49
- package/dist/expo-thumbnails.js +2 -2
- package/dist/expo-video-orientation.d.ts +7 -0
- package/dist/expo-video-orientation.js +14 -0
- package/dist/expo-video-thumbnail.d.ts +6 -0
- package/dist/expo-video-thumbnail.js +30 -0
- package/dist/expo-voicemail-recorder.d.ts +18 -0
- package/dist/expo-voicemail-recorder.js +214 -0
- package/dist/expo-voicemail-storage.d.ts +10 -0
- package/dist/expo-voicemail-storage.js +81 -0
- package/dist/expo-voicemail-video.d.ts +15 -0
- package/dist/expo-voicemail-video.js +44 -0
- package/dist/expo-voicemail.d.ts +34 -0
- package/dist/expo-voicemail.js +110 -0
- package/dist/expo.d.ts +3 -0
- package/dist/expo.js +3 -0
- package/dist/header-action-group.d.ts +11 -0
- package/dist/header-action-group.js +7 -0
- package/dist/header-calls.js +2 -1
- package/dist/history-anchor.d.ts +29 -0
- package/dist/history-anchor.js +74 -0
- package/dist/history-follow.d.ts +18 -0
- package/dist/history-follow.js +35 -0
- package/dist/index.d.ts +14 -1
- package/dist/index.js +94 -74
- package/dist/message-time.d.ts +7 -0
- package/dist/message-time.js +17 -0
- package/dist/messenger-video-view.d.ts +4 -1
- package/dist/messenger-video-view.js +15 -4
- package/dist/recording-notice.d.ts +5 -0
- package/dist/recording-notice.js +13 -0
- package/dist/use-quote-gesture.d.ts +1 -0
- package/dist/use-quote-gesture.js +1 -0
- package/dist/video-message-badge.d.ts +7 -0
- package/dist/video-message-badge.js +8 -0
- package/dist/video-orientation.d.ts +13 -0
- package/dist/video-orientation.js +58 -0
- package/dist/voice-composer.d.ts +3 -1
- package/dist/voice-composer.js +7 -6
- package/dist/voicemail-flow.d.ts +60 -0
- package/dist/voicemail-flow.js +156 -0
- package/dist/voicemail-media.d.ts +19 -0
- package/dist/voicemail-media.js +45 -0
- package/dist/voicemail-message.d.ts +41 -0
- package/dist/voicemail-message.js +48 -0
- package/dist/voicemail-prompts.d.ts +4 -0
- package/dist/voicemail-prompts.js +3 -0
- package/dist/voicemail-recording.d.ts +15 -0
- package/dist/voicemail-recording.js +46 -0
- package/dist/voicemail-session.d.ts +19 -0
- package/dist/voicemail-session.js +48 -0
- package/dist/voicemail.d.ts +179 -0
- package/dist/voicemail.js +234 -0
- package/package.json +9 -5
- package/plugin/prepare-native.cjs +1 -0
- package/plugin/video-display-mirror.cjs +66 -0
- package/setup.plugin.cjs +1 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
const marker = '// Robono: preserve reflected video display matrices without mirroring controls.';
|
|
4
|
+
function insert(source, anchor, replacement) {
|
|
5
|
+
if (source.includes(marker)) return source;
|
|
6
|
+
if (!source.includes(anchor)) throw Error('Unsupported expo-video display adapter. Update the Robono messaging adapter before building.');
|
|
7
|
+
return source.replace(anchor, replacement);
|
|
8
|
+
}
|
|
9
|
+
function patchView(source) {
|
|
10
|
+
return insert(source, ' var useNativeControls: Boolean = true', ` ${marker}
|
|
11
|
+
var mirrorVideoSurface: Boolean = false
|
|
12
|
+
set(value) {
|
|
13
|
+
field = value
|
|
14
|
+
playerView.videoSurfaceView?.scaleX = if (value) -1f else 1f
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var useNativeControls: Boolean = true`);
|
|
18
|
+
}
|
|
19
|
+
function patchModule(source) {
|
|
20
|
+
return insert(source, ' Prop("nativeControls") { view: T, useNativeControls: Boolean ->', ` ${marker}
|
|
21
|
+
Prop("mirrorVideoSurface") { view: T, mirrored: Boolean ->
|
|
22
|
+
view.mirrorVideoSurface = mirrored
|
|
23
|
+
}
|
|
24
|
+
Prop("nativeControls") { view: T, useNativeControls: Boolean ->`);
|
|
25
|
+
}
|
|
26
|
+
function patchFullscreen(source) {
|
|
27
|
+
let result = insert(source, ' playerView = findViewById(R.id.player_view)', ` playerView = findViewById(R.id.player_view)
|
|
28
|
+
${marker}
|
|
29
|
+
playerView.videoSurfaceView?.scaleX = if (videoView.mirrorVideoSurface) -1f else 1f`);
|
|
30
|
+
const target='setContentView(if (videoView.mirrorVideoSurface) R.layout.robono_fullscreen_texture_player_activity else R.layout.fullscreen_player_activity)';
|
|
31
|
+
if (!result.includes(target)) {
|
|
32
|
+
const anchor='setContentView(R.layout.fullscreen_player_activity)';
|
|
33
|
+
if (!result.includes(anchor)) throw Error('Unsupported fullscreen video layout.');
|
|
34
|
+
result=result.replace(anchor,target);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
function install(root) {
|
|
39
|
+
const dependency = path.dirname(require.resolve('expo-video/package.json', {paths:[root]}));
|
|
40
|
+
// Media3 1.8/1.9 rotates reflected tracks but explicitly drops their reflection.
|
|
41
|
+
// Newer versions may handle it themselves; never silently apply it twice.
|
|
42
|
+
if(!/androidxMedia3Version\s*=\s*"1\.[89]\.\d+"/.test(fs.readFileSync(path.join(dependency,'android/build.gradle'),'utf8')))throw Error('Review the Robono video mirror adapter for this Media3 version before building.');
|
|
43
|
+
const base = path.join(dependency, 'android/src/main/java/expo/modules/video');
|
|
44
|
+
const patches = [['VideoView.kt',patchView],['VideoModule.kt',patchModule],['FullscreenPlayerActivity.kt',patchFullscreen]];
|
|
45
|
+
// Validate every anchor before changing any dependency source.
|
|
46
|
+
const updates = patches.map(([name,patch])=>{const file=path.join(base,name),before=fs.readFileSync(file,'utf8');return {file,before,after:patch(before)};});
|
|
47
|
+
const layout=path.join(dependency,'android/src/main/res/layout/fullscreen_player_activity.xml');
|
|
48
|
+
const xml=fs.readFileSync(layout,'utf8');
|
|
49
|
+
if(!xml.includes('app:use_controller=')||xml.includes('app:surface_type='))throw Error('Review the fullscreen video surface layout before preparing.');
|
|
50
|
+
const texture=xml.replace('app:use_controller=', 'app:surface_type="texture_view" app:use_controller=');
|
|
51
|
+
const texturePath=path.join(path.dirname(layout),'robono_fullscreen_texture_player_activity.xml');
|
|
52
|
+
if(!fs.existsSync(texturePath)||fs.readFileSync(texturePath,'utf8')!==texture)fs.writeFileSync(texturePath,texture);
|
|
53
|
+
for(const {file,before,after} of updates)if(before!==after)fs.writeFileSync(file,after);
|
|
54
|
+
// Expo 56 may otherwise link its published AAR and silently ignore these
|
|
55
|
+
// source corrections. Preserve host choices and opt out for this module only.
|
|
56
|
+
const manifestPath=path.join(root,'package.json');
|
|
57
|
+
const manifest=JSON.parse(fs.readFileSync(manifestPath,'utf8'));
|
|
58
|
+
manifest.expo??={};manifest.expo.autolinking??={};
|
|
59
|
+
const android=manifest.expo.autolinking.android??={};
|
|
60
|
+
android.buildFromSource??=[...(manifest.expo.autolinking.buildFromSource??[])];
|
|
61
|
+
if(!android.buildFromSource.includes('expo-video')){
|
|
62
|
+
android.buildFromSource.push('expo-video');
|
|
63
|
+
fs.writeFileSync(manifestPath,JSON.stringify(manifest,null,2)+'\n');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
module.exports={patchView,patchModule,patchFullscreen,install};
|
package/setup.plugin.cjs
CHANGED
|
@@ -9,6 +9,7 @@ module.exports=createRunOncePlugin(config=>{
|
|
|
9
9
|
['expo-sensors',{motionPermission:'Allow this app to share device movement with the people you choose. This does not share your location.'}],
|
|
10
10
|
['expo-location',{locationWhenInUsePermission:'Allow location access when you choose to share weather or your location.'}],
|
|
11
11
|
['expo-audio',{microphonePermission:'Allow microphone access for voice messages and calls.',enableBackgroundRecording:false}],
|
|
12
|
+
['expo-camera',{cameraPermission:'Allow camera access for video calls and video voicemail.',microphonePermission:'Allow microphone access for calls and voicemail.',barcodeScannerEnabled:false}],
|
|
12
13
|
['expo-image-picker',{cameraPermission:'Allow camera access to take photos and videos for messages.'}],
|
|
13
14
|
['expo-media-library',{photosPermission:'Allow access to save photos and videos you choose.',savePhotosPermission:'Allow saving photos and videos you choose to your library.',granularPermissions:['photo','video']}],
|
|
14
15
|
'expo-notifications','@robono/messaging-react-native',
|