Skip to content

Instantly share code, notes, and snippets.

View troy-lamerton's full-sized avatar

Troy troy-lamerton

  • 06:24 (UTC +12:00)
View GitHub Profile
@troy-lamerton
troy-lamerton / crash.log
Last active September 4, 2022 13:42
bnb 1.5.0 crash shortly after calling processImage
2022-09-03 12:46:00.916 32334-32373 E/AndroidRuntime: FATAL EXCEPTION: UnityMain
Process: com.gamingforgood.MobilePlugins, PID: 32334
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2020.3.35f1 (18e4db7a9996)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'samsung/crownltexx/crownlte:10/QP1A.190711.020/N960FXXU9FVH1:user/release-keys'
Revision: '28'
ABI: 'arm'
Timestamp: 2022-09-03 12:46:00+0200
pid: 32334, tid: 32549, name: BanubaSDK nativ >>> com.gamingforgood.MobilePlugins <<<
uid: 11291
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "poppy mac-m1 static.123.23.234.188.example.com"
url = "https://gitlab.domain.com/"
token = "xcensoredx"
@troy-lamerton
troy-lamerton / launch_and_oom.txt
Created March 26, 2022 07:19
Bugsnag Android OOM crash and relaunch (Xiaomi Mi 9)
2022-03-26 08:14:43.358 31928-31928 W/Zygote: Unable to open libbeluga.so: dlopen failed: library "libbeluga.so" not found.
2022-03-26 08:14:43.360 31928-31928 I/libc: SetHeapTaggingLevel: tag level set to 0
2022-03-26 08:14:43.363 31928-31928 I/od.BugsnagUnit: Late-enabling -Xcheck:jni
2022-03-26 08:14:43.379 31928-31928 I/od.BugsnagUnit: Unquickening 20 vdex files!
2022-03-26 08:14:43.425 31928-31928 D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
2022-03-26 08:14:43.453 31928-31928 I/Perf: Connecting to perf service.
2022-03-26 08:14:43.463 31928-31928 D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-03-26 08:14:43.464 31928-31928 D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-03-26 08:14:43.522 31928-31928 D/Unity: CommandLine:
2022-03-26 08:14:43.542 31928-31928 I/Unity: onResume
@troy-lamerton
troy-lamerton / HelloPlugin.cs
Last active March 28, 2023 00:57
Swift "Hello World" Unity plugin
using System.Runtime.InteropServices;
// Put this C# file anywhere in Assets/
public static class HelloPlugin {
/// Call into swift
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal", EntryPoint = "LIBHelloWorld")]
public static extern void HelloWorld();
#else
@troy-lamerton
troy-lamerton / Compatibility_report-2021-05-14-15-04-26.txt
Created May 14, 2021 14:21
bluestacks aida64 info, with different bluestacks Engine setting
AIDA64 for Android v1.78 Report
<<< System >>>
Device Model: Samsung Galaxy S8+ (Global)
Device Codename: Dream 2
Device Type: Phablet
Manufacturer: samsung
Model: SM-G955F
Brand: samsung
function preloadVideo(video) {
// just before video would play, pause it
video.addEventListener('canplay', preloadingVideoCanPlay, {once: true});
// begin preloading the playlist and first hls segment (useful for VODs)
video.play();
}
function preloadingVideoCanPlay() {
// video has buffered enough for playback
video.pause();

Methods

public static class CosMediaPlayer {

    /// <summary>
    /// Set the shown video and optionally the preloading video url.
    /// </summary>
    /// <remarks>
    /// If the video at `videoUrl` is already playing, it will continue playing.
// unity 2019.3
#import <UIKit/UIKit.h>
#import "UnityAppController.h"
#import <Commons/Commons-Swift.h>
#import "UnityInterface.h"
@interface MainAppController : UnityAppController<UIApplicationDelegate>
@end
@troy-lamerton
troy-lamerton / youtube_format_code_itag_list.md
Created May 8, 2020 12:18 — forked from sidneys/youtube_format_code_itag_list.md
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@troy-lamerton
troy-lamerton / WebViewClient.java
Created May 6, 2020 17:25 — forked from kibotu/WebViewClient
Android WebView: resource interception and replacement by local resource
mWebView.setWebViewClient(new WebViewClient() {
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
if (url.contains("creditcard_cvc.jpg")) {
Log.v("WebView", "Replacing [" + url + "] with [R.raw.tmp_replacement]");
ContentResolver contentResolver = getActivity().getContentResolver();
return new WebResourceResponse(contentResolver.getType(Uri.parse(url)), "UTF-8", getResources().openRawResource(R.raw.tmp_replacement));
}
return super.shouldInterceptRequest(view, url);