smartlook / cordova-smartlook

Official Smartlook SDK plugin for Cordova Android and iOS.
https://www.smartlook.com
MIT License
9 stars 6 forks source link

Question: Can you use Smartlook on a React + Ionic (Capacitor) app ? #36

Closed jcardenaslie closed 1 year ago

jcardenaslie commented 2 years ago

Can be this plugin be issued with a react + ionic (capacitor) app ? I read this Doc: [https://mobile.developer.smartlook.com/v1.0/reference/ionic-sdk-installation] But the example is with Angular. Can be used with react ?

thanks

wsamoht commented 1 year ago

I am using it with Vue Ionic project with Capacitor so it should work with React as well.

jcardenaslie commented 1 year ago

Hey @wsamoht thanks for answering. Which SDK are you using?

Thanks :)

wsamoht commented 1 year ago

The two npm packages I have installed are:

To use, I initialize when my Vue app is mounted:

import { Smartlook, SmartlookSetupConfig } from '@awesome-cordova-plugins/smartlook'

Smartlook.setupAndStartRecording(
    new SmartlookSetupConfig(YOUR_SMARTLOOK_KEY)
)

Please note that if you are using Gradle v7 (Capacitor 4), then you will need to install cordova-plugin-smartlook@master since https://github.com/smartlook/cordova-smartlook/pull/35 hasn't been tagged yet.

jcardenaslie commented 1 year ago

Thanks a lot @wsamoht !

Ill give it a try!

jcardenaslie commented 1 year ago

Repo: https://github.com/jcardenaslie/ionic-react-smartlook-concept

I think that new SmartlookSetupConfig(YOUR_SMARTLOOK_KEY) is working fine 'cuz im seeing this result on the Logcat from Android, the following output is showing:

V/Capacitor/Plugin: To native (Cordova plugin): callbackId: SmartlookPlugin781912788, service: SmartlookPlugin, action: setupAndStartRecording, actionArgs: [YOUR_SMARTLOOK_KEY,-1,"",false,false,[]]

But not sure if Smartlook.setupAndStartRecording() is working, cuz nothing is reaching the smartlook recording dashboard:

I consoled the return of the function, but not sure it actually return something I/Capacitor/Console: File: http://localhost/static/js/main.c5b99d0e.js - Line 2 - Msg: INIT SMARTLOOK undefined

Perhaps has something to do with this line: D/Smartlook_ConfigurationHandler: setup() error: code = 429, message = null, [logAspect: MANDATORY]

I think is trying to record the screen but for some reason I do not understand crashes:

The complete log:

2022-09-30 00:55:38.546 12070-12070/io.ionic.smartlookionic D/Capacitor: Loading app at http://localhost
2022-09-30 00:55:38.551 12070-12125/io.ionic.smartlookionic W/.smartlookioni: Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (unsupported, reflection, allowed)
2022-09-30 00:55:38.554 12070-12144/io.ionic.smartlookionic D/HostConnection: createUnique: call
2022-09-30 00:55:38.555 12070-12144/io.ionic.smartlookionic D/HostConnection: HostConnection::get() New Host Connection established 0xb400007ce9ae1910, tid 12144
2022-09-30 00:55:38.557 12070-12070/io.ionic.smartlookionic D/Capacitor: App started
2022-09-30 00:55:38.557 12104-12139/io.ionic.smartlookionic I/cr_LibraryLoader: Loaded native library version number "91.0.4472.114"
2022-09-30 00:55:38.558 12104-12139/io.ionic.smartlookionic I/cr_CachingUmaRecorder: Flushed 1 samples from 1 histograms.
2022-09-30 00:55:38.558 12070-12070/io.ionic.smartlookionic D/Capacitor/AppPlugin: Firing change: true
2022-09-30 00:55:38.558 12070-12070/io.ionic.smartlookionic V/Capacitor/AppPlugin: Notifying listeners for event appStateChange
2022-09-30 00:55:38.558 12070-12070/io.ionic.smartlookionic D/Capacitor/AppPlugin: No listeners found for event appStateChange
2022-09-30 00:55:38.559 12070-12070/io.ionic.smartlookionic D/Capacitor: App resumed
2022-09-30 00:55:38.562 12070-12125/io.ionic.smartlookionic W/cr_media: Requires BLUETOOTH permission
2022-09-30 00:55:38.566 12104-12139/io.ionic.smartlookionic W/SystemServiceRegistry: No service published for: uimode
2022-09-30 00:55:38.566 12070-12144/io.ionic.smartlookionic D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2022-09-30 00:55:38.570 12070-12144/io.ionic.smartlookionic D/EGL_emulation: eglCreateContext: 0xb400007ce9ae1010: maj 3 min 0 rcv 3
2022-09-30 00:55:38.571 12070-12144/io.ionic.smartlookionic D/EGL_emulation: eglMakeCurrent: 0xb400007ce9ae1010: ver 3 0 (tinfo 0x7f01a97080) (first time)
2022-09-30 00:55:38.571 12070-12124/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/
2022-09-30 00:55:38.586 12070-12144/io.ionic.smartlookionic D/EGL_emulation: eglCreateContext: 0xb400007ce9adfa50: maj 3 min 0 rcv 3
2022-09-30 00:55:38.606 12070-12094/io.ionic.smartlookionic D/HostConnection: createUnique: call
2022-09-30 00:55:38.607 12070-12094/io.ionic.smartlookionic D/HostConnection: HostConnection::get() New Host Connection established 0xb400007ce9ae0050, tid 12094
2022-09-30 00:55:38.622 12070-12094/io.ionic.smartlookionic D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2022-09-30 00:55:38.622 12070-12094/io.ionic.smartlookionic W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2022-09-30 00:55:38.623 12070-12094/io.ionic.smartlookionic W/OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS
2022-09-30 00:55:38.623 12070-12094/io.ionic.smartlookionic D/EGL_emulation: eglCreateContext: 0xb400007ce9ae0350: maj 3 min 0 rcv 3
2022-09-30 00:55:38.624 12070-12144/io.ionic.smartlookionic D/EGL_emulation: eglCreateContext: 0xb400007ce9ae3d10: maj 3 min 0 rcv 3
2022-09-30 00:55:38.625 12070-12094/io.ionic.smartlookionic D/EGL_emulation: eglMakeCurrent: 0xb400007ce9ae0350: ver 3 0 (tinfo 0x7f01a97100) (first time)
2022-09-30 00:55:38.630 12070-12094/io.ionic.smartlookionic I/Gralloc4: mapper 4.x is not supported
2022-09-30 00:55:38.632 12070-12094/io.ionic.smartlookionic D/HostConnection: createUnique: call
2022-09-30 00:55:38.632 12070-12094/io.ionic.smartlookionic D/HostConnection: HostConnection::get() New Host Connection established 0xb400007ce9ae3f50, tid 12094
2022-09-30 00:55:38.633 12070-12094/io.ionic.smartlookionic D/goldfish-address-space: allocate: Ask for block of size 0x100
2022-09-30 00:55:38.633 12070-12094/io.ionic.smartlookionic D/goldfish-address-space: allocate: ioctl allocate returned offset 0x1f3ff8000 size 0x8000
2022-09-30 00:55:38.634 12070-12094/io.ionic.smartlookionic W/Gralloc4: allocator 4.x is not supported
2022-09-30 00:55:38.645 12070-12094/io.ionic.smartlookionic D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2022-09-30 00:55:38.710 12070-12124/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/static/js/main.88ea4534.js
2022-09-30 00:55:38.715 12070-12127/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/static/css/main.f8af1edb.css
2022-09-30 00:55:38.757 12070-12070/io.ionic.smartlookionic I/Capacitor/Console: File: http://localhost/ - Line 2616 - Msg: onscript loading complete
2022-09-30 00:55:38.894 12070-12124/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/static/js/22.d3bccf4b.chunk.js
2022-09-30 00:55:38.898 12070-12070/io.ionic.smartlookionic V/Capacitor/Plugin: To native (Cordova plugin): callbackId: SmartlookPlugin1526126156, service: SmartlookPlugin, action: setPluginVersion, actionArgs: ["CORDOVA","-","1.9.5"]
2022-09-30 00:55:38.905 12070-12070/io.ionic.smartlookionic W/.smartlookioni: Accessing hidden method Landroid/app/ActivityThread;->currentApplication()Landroid/app/Application; (unsupported, reflection, allowed)
2022-09-30 00:55:38.931 12070-12070/io.ionic.smartlookionic V/Capacitor/Plugin: To native (Cordova plugin): callbackId: SmartlookPlugin1526126157, service: SmartlookPlugin, action: setupAndStartRecording, actionArgs: ["71374b32aa002c97abe249c28feff5c08eff80e4",-1,"",false,false,[]]
2022-09-30 00:55:38.974 12070-12127/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/assets/icon/favicon.png
2022-09-30 00:55:38.986 12070-12070/io.ionic.smartlookionic I/Capacitor/Console: File: http://localhost/static/js/main.88ea4534.js - Line 2 - Msg: INIT SMARTLOOK SETUP undefined
2022-09-30 00:55:38.987 12070-12070/io.ionic.smartlookionic W/Capacitor/Console: File: http://localhost/static/js/main.88ea4534.js - Line 2 - Msg: SOME LOG
2022-09-30 00:55:38.987 12070-12070/io.ionic.smartlookionic I/Capacitor/Console: File: http://localhost/static/js/main.88ea4534.js - Line 2 - Msg: Ionic Native: deviceready event fired after 93 ms
2022-09-30 00:55:38.988 12070-12127/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/assets/icon/favicon.png
2022-09-30 00:55:38.998 12070-12127/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/static/js/272.8625c792.chunk.js
2022-09-30 00:55:39.001 12070-12127/io.ionic.smartlookionic D/Capacitor: Handling local request: http://localhost/static/js/841.66bd82ec.chunk.js
2022-09-30 00:55:39.006 12070-12070/io.ionic.smartlookionic V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 32869131, pluginId: App, methodName: addListener
2022-09-30 00:55:39.006 12070-12070/io.ionic.smartlookionic V/Capacitor: callback: 32869131, pluginId: App, methodName: addListener, methodData: {"eventName":"backButton"}
2022-09-30 00:55:40.089 12070-12070/io.ionic.smartlookionic D/Smartlook_ConfigurationHandler: setup() error: code = 429, message = null, [logAspect: MANDATORY]
2022-09-30 00:55:40.155 12070-12081/io.ionic.smartlookionic W/System: A resource failed to call close. 
2022-09-30 00:55:40.196 12070-12094/io.ionic.smartlookionic D/EGL_emulation: app_time_stats: avg=215.99ms min=12.97ms max=1082.34ms count=7
2022-09-30 00:55:54.033 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: PreAllocation enabled
2022-09-30 00:55:54.035 12070-12223/io.ionic.smartlookionic D/CCodec: allocate(c2.android.avc.encoder)
2022-09-30 00:55:54.036 12070-12223/io.ionic.smartlookionic I/Codec2Client: Available Codec2 services: "default" "software"
2022-09-30 00:55:54.037 12070-12223/io.ionic.smartlookionic I/CCodec: setting up 'default' as default (vendor) store
2022-09-30 00:55:54.052 12070-12223/io.ionic.smartlookionic I/CCodec: Created component [c2.android.avc.encoder]
2022-09-30 00:55:54.053 12070-12223/io.ionic.smartlookionic D/CCodecConfig: read media type: video/avc
2022-09-30 00:55:54.055 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
2022-09-30 00:55:54.056 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values
2022-09-30 00:55:54.056 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
2022-09-30 00:55:54.056 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
2022-09-30 00:55:54.056 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.allocator-ids.values
2022-09-30 00:55:54.057 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
2022-09-30 00:55:54.057 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values
2022-09-30 00:55:54.058 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: ignored struct field coding.gop.values
2022-09-30 00:55:54.058 12070-12223/io.ionic.smartlookionic D/ReflectedParamUpdater: ignored struct field coding.qp.values
2022-09-30 00:55:54.059 12070-12223/io.ionic.smartlookionic D/CCodecConfig: ignoring local param raw.color (0xc2001809) as it is already supported
2022-09-30 00:55:54.059 12070-12223/io.ionic.smartlookionic I/CCodecConfig: query failed after returning 12 values (BAD_INDEX)
2022-09-30 00:55:54.059 12070-12223/io.ionic.smartlookionic D/CCodecConfig: c2 config diff is Dict {
      c2::u32 coded.bitrate.value = 64000
      c2::float coded.frame-rate.value = 1
      c2::u32 coded.pl.level = 20492
      c2::u32 coded.pl.profile = 20481
      c2::u32 coded.vui.color.matrix = 0
      c2::u32 coded.vui.color.primaries = 0
      c2::u32 coded.vui.color.range = 0
      c2::u32 coded.vui.color.transfer = 0
      c2::u32 coding.intra-refresh.mode = 0
      c2::float coding.intra-refresh.period = 0
      c2::u32 coding.request-sync-frame.value = 0
      c2::i64 coding.sync-frame-interval.value = 1000000
      c2::u32 input.delay.value = 0
      string input.media-type.value = "video/raw"
      string output.media-type.value = "video/avc"
      c2::u32 raw.color.matrix = 0
      c2::u32 raw.color.primaries = 0
      c2::u32 raw.color.range = 0
      c2::u32 raw.color.transfer = 0
      c2::u32 raw.size.height = 16
      c2::u32 raw.size.width = 16
    }
2022-09-30 00:55:54.060 12070-12223/io.ionic.smartlookionic W/ColorUtils: expected specified color aspects (0:0:0:0)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecSeeding: Seed: codec c2.android.avc.encoder, mediatype video/avc, overrideable 1
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp,0)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp-1080p,1.90)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp-720p,2.25)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp-540p,2.65)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp-480p,3.00)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-bpp-320x240,0)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-qpmax,-1)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-qpmax-1080p,45)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-qpmax-720p,43)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-qpmax-540p,42)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-target-qpmax-480p,38)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-bitrate-phaseout,1.75)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setTuningValue(vq-boost-missing-qp,0.20)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setFeatureValue(intra-refresh,0)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setFeatureValue(qp-bounds,0)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setFeatureValue(_vq_eligible.device,1)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecProperties: setFeatureValue(_quality.target,1)
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/CodecSeeding: Seed: codec c2.android.avc.encoder, mediatype video/avc, overrideable 0
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/VQApply: raise bitrate: configured 80000 to floor 691200
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/VQApply: minquality by QP: inject video-qp-max=38
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/VQApply: minquality/target bitrate raised from 80000 to 691200 bps
2022-09-30 00:55:54.065 12070-12181/io.ionic.smartlookionic D/MediaCodec: shapeMediaFormat: deltas(6): AMessage(what = 0x00000000) = {
        int32_t bitrate = 691200
        int32_t android._encoding-quality-level = 0
        int32_t video-qp-max = 38
        int32_t video-qp-i-max = 38
        int32_t video-qp-p-max = 41
        int32_t video-qp-b-max = 44
      }
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodec: [c2.android.avc.encoder] buffers are bound to CCodec for this session
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for color-format
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for video-qp-max
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for video-qp-i-max
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for video-qp-p-max
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for video-qp-b-max
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for flags
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: no c2 equivalents for encoder
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic D/CCodecConfig: c2 config diff is   c2::u32 coded.bitrate.value = 691200
      c2::float coded.frame-rate.value = 2
      c2::i64 coding.sync-frame-interval.value = 10000000
      c2::u32 raw.size.height = 720
      c2::u32 raw.size.width = 320
2022-09-30 00:55:54.066 12070-12223/io.ionic.smartlookionic W/ColorUtils: expected specified color aspects (0:0:0:0)
2022-09-30 00:55:54.067 12070-12223/io.ionic.smartlookionic D/CCodec: setup formats input: AMessage(what = 0x00000000) = {
      Rect crop(0, 0, 319, 719)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t frame-rate = 2
      int32_t height = 720
      int32_t intra-refresh-period = 0
      string mime = "video/raw"
      int32_t width = 320
      int32_t android._dataspace = 0
      int32_t using-sw-read-often = 1
      int64_t android._C2MemoryUsage = 1
      int32_t color-format = 2130708361
      int32_t android._color-format = 2130708361
    }
2022-09-30 00:55:54.067 12070-12223/io.ionic.smartlookionic D/CCodec: setup formats output: AMessage(what = 0x00000000) = {
      int32_t bitrate = 691200
      Rect crop(0, 0, 319, 719)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t frame-rate = 2
      int32_t height = 720
      int32_t intra-refresh-period = 0
      int32_t level = 4096
      int32_t max-bitrate = 691200
      string mime = "video/avc"
      int32_t profile = 65536
      int32_t width = 320
    }
2022-09-30 00:55:54.067 12070-12223/io.ionic.smartlookionic I/CCodecConfig: query failed after returning 13 values (BAD_INDEX)
2022-09-30 00:55:54.067 12070-12223/io.ionic.smartlookionic D/CCodec: input format changed to AMessage(what = 0x00000000) = {
      Rect crop(0, 0, 319, 719)
      int32_t color-standard = 4
      int32_t color-range = 2
      int32_t color-transfer = 3
      int32_t frame-rate = 2
      int32_t height = 720
      int32_t intra-refresh-period = 0
      string mime = "video/raw"
      int32_t width = 320
      int32_t android._dataspace = 259
      int32_t using-sw-read-often = 1
      int64_t android._C2MemoryUsage = 1
      int32_t color-format = 2130708361
      int32_t android._color-format = 2130708361
    }
2022-09-30 00:55:54.068 12070-12223/io.ionic.smartlookionic D/GraphicBufferSource: setting dataspace: 0x103, acquired=0
2022-09-30 00:55:54.068 12070-12223/io.ionic.smartlookionic D/CCodec: ISConfig not changed
2022-09-30 00:55:54.069 12070-12223/io.ionic.smartlookionic W/Codec2Client: query -- param skipped: index = 1342179345.
2022-09-30 00:55:54.069 12070-12223/io.ionic.smartlookionic W/Codec2Client: query -- param skipped: index = 2415921170.
2022-09-30 00:55:54.069 12070-12223/io.ionic.smartlookionic D/CCodecBufferChannel: [c2.android.avc.encoder#123] Using basic input block pool with poolID 1 => got 1 - OK (0)
2022-09-30 00:55:54.069 12070-12223/io.ionic.smartlookionic D/C2Store: Using DMABUF Heaps
2022-09-30 00:55:54.070 12070-12223/io.ionic.smartlookionic I/CCodecBufferChannel: [c2.android.avc.encoder#123] Created output block pool with allocatorID 16 => poolID 72 - OK
2022-09-30 00:55:54.070 12070-12223/io.ionic.smartlookionic D/CCodecBufferChannel: [c2.android.avc.encoder#123] Configured output block pool ids 72 => OK
2022-09-30 00:55:54.078 12070-12181/io.ionic.smartlookionic D/GraphicBufferSource: got buffer with new dataSpace #103
2022-09-30 00:55:54.078 12070-12181/io.ionic.smartlookionic D/C2OMXNode: dataspace changed to 0x103 pixel format: 0x1
2022-09-30 00:55:54.086 12070-12223/io.ionic.smartlookionic D/CCodecConfig: c2 config diff is   Buffer coded.init-data.value = {
        00000000:  00 00 00 01 67 42 c0 29  8d 68 14 05 ba 42 0c 02  ....gB.).h...B..
        00000010:  0c 0f 08 84 6a 00 00 00  01 68 ce 01 a8 35 c8     ....j....h...5.
      }
2022-09-30 00:55:54.086 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: fpathconf _PC_FILESIZEBITS:64
2022-09-30 00:55:54.087 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: File size limit set to 4503599627370495 bytes implicitly
2022-09-30 00:55:54.087 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: MP4WtrCtrlHlpLooper Started
2022-09-30 00:55:54.087 12070-12181/io.ionic.smartlookionic I/MPEG4Writer: limits: 4503599627370495/0 bytes/us, bit rate: -1 bps and the estimated moov size 3192 bytes
2022-09-30 00:55:54.092 12070-12237/io.ionic.smartlookionic I/MPEG4Writer: setStartTimestampUs: 0
2022-09-30 00:55:54.092 12070-12237/io.ionic.smartlookionic I/MPEG4Writer: Earliest track starting time: 0
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: reset()
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Video track stopping. Stop source
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Video track source stopping
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Video track source stopped
2022-09-30 00:55:54.992 12070-12237/io.ionic.smartlookionic V/MediaWriter: Track event err/info msg:101, trackId:1, type:1000,val:-1011
2022-09-30 00:55:54.992 12070-12237/io.ionic.smartlookionic I/MPEG4Writer: Received total/0-length (34/0) buffers and encoded 34 frames. - Video
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Video track stopped. Status:0. Stop source
2022-09-30 00:55:54.992 12070-12235/io.ionic.smartlookionic D/MPEG4Writer: 0 chunks are written in the last batch
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: WriterThread stopped. Status:0
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic I/MPEG4Writer: Adjust the moov start time from 0 us -> 0 us
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic I/MPEG4Writer: MOOV atom was written to the file
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: release()
2022-09-30 00:55:54.992 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: ftruncate mPreAllocateFileEndOffset:24644 mOffset:1189 mMdatEndOffset:22820 diff:1824
2022-09-30 00:55:54.993 12070-12223/io.ionic.smartlookionic I/hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: final fsync() takes 2 ms, file size 22820
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: MP4WtrCtrlHlpLooper stopped
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Top 5 write durations(microseconds): #1:8 #2:10 #3:11 #4:11 #5:17
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: reset()
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic D/MPEG4Writer: Video track stopping. Stop source
2022-09-30 00:55:54.995 12070-12181/io.ionic.smartlookionic E/MPEG4Writer: Stop() called but track is not started or stopped
wsamoht commented 1 year ago

Hmmm...the MPEG4Writer logs seem normal so that is encouraging that it is working. The 429 error suggests rate limiting on Smartlook's end for their API. Maybe validate your Smartlook secret is correct and what is getting passed to SmartlookSetupConfig is the same/correct.

It also does take a little bit for Smartlook's dashboard to show you the recordings as they do some post-processing of the video too I believe.

c0mtru1se commented 1 year ago

Hi @jcardenaslie ! Just fyi, we have released a brand new, ground-up rewritten version 2.0 of this plugin today. It uses our new, and long-term supported 2.x+ native SDKs.

We have also pushed a PR to the awesome-cordova-plugins repository. Once the PR gets merged and released, you should be able to use both those plugins in your Ionic project. Capacitor with both React, Angular and Vue frontends is also fully supported and tested by us internally. Please then kindly consult our docs to migrate to the v2.0 as there were some breaking changes in the API. I'll gladly be of any help if you run to any issues.

Thanks!