This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
typedef AsyncDataBuilder<T> = Widget Function(BuildContext, T); | |
typedef AsyncErrorBuilder = Widget Function(BuildContext, dynamic); | |
/// 非同期データの取得を管理するWidget。 | |
/// 初回ビルド時に非同期データを取得し、[builder]が返却するWidgetをビルドする。 | |
/// その後、必要に応じて非同期データの再取得を行い、Widgetを再構築する。 | |
/// | |
/// [refreshOnDidPopNext]をtrueにすると、[Navigator.pop]でこのWidgetが含まれる画面に戻ってきた時に再取得する。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
android:name=".MainActivity" | |
...> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
<category android:name="android.intent.category.BROWSABLE"/> | |
<data android:host="handle" android:scheme="myscheme" /> | |
</intent-filter> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express() | |
const { spawn } = require('child_process'); | |
const URL = 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8' | |
app | |
.get('/video.webm', (req, res) => { | |
res.type('video/webm') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -y -i .\video.mp4 -loop 0 -vf scale=640:-1 output.webp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'dart:math'; | |
import 'dart:typed_data'; | |
import "package:pointycastle/export.dart"; | |
import "package:asn1lib/asn1lib.dart"; | |
List<int> decodePEM(String pem) { | |
var startsWith = [ | |
"-----BEGIN PUBLIC KEY-----", | |
"-----BEGIN PRIVATE KEY-----", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
var activity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Runtime.InteropServices; | |
public class VideoPlayer: MonoBehaviour { | |
public string videoPath; | |
public bool autoPlay = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.Manifest | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.location.Location | |
import android.os.Looper | |
import android.support.v4.app.ActivityCompat | |
import android.support.v4.content.ContextCompat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.graphics.SurfaceTexture | |
import android.net.Uri | |
import android.view.Surface | |
interface IPlayer { | |
/** | |
* コンテンツの全体時間を取得する。単位はミリ秒。 | |
*/ |