顯示具有 Android 標籤的文章。 顯示所有文章
顯示具有 Android 標籤的文章。 顯示所有文章

星期一, 4月 13, 2015

星期二, 1月 20, 2015

Unity mobile movie texture plugin test

Vuforia ( Video Playback )
Android
StreamingAsset 資料夾:正常
Http:正常
temporaryCachePath:正常

iOS
StreamingAsset 資料夾:正常
Http:會全螢幕播放
temporaryCachePath:無法播放


Easy Movie Texture For Android (Video Texture)
Android
StreamingAsset 資料夾:未測試
Http:未測試
temporaryCachePath:未測試

iOS (尚未有正式版,Beta版)
StreamingAsset 資料夾:正常
Http:無法播放
temporaryCachePath:未測試


Mobile Movie Texture
Android
StreamingAsset 資料夾:正常播放,但尚未支援音訊
Http:無法播放
temporaryCachePath:未測試

iOS
StreamingAsset 資料夾:正常播放,但尚未支援音訊
Http:無法播放
temporaryCachePath:未測試


Video Texture Pro 2.0
Android:未支援

iOS
StreamingAsset 資料夾:正常
Http:正常
temporaryCachePath:正常



作業系統 : OS X 10.10.1

Unity版本 : 4.6.1 pro , Android pro , iOS pro

Xcode : 6.1.1 ( SDK 8.1 )

視訊 : mp4 ( H.264,AAC )

測試設備:iPad 2(iOS 7.1.1)、iPad 4(iOS 8.1)

以上測試環境會出現同一問題

在iPad 2上,影片會正常播放,但是無聲音

在iPad 4上,影片、聲音正常播放

尚未研究為何

星期一, 7月 21, 2014

HTML截取定位資訊轉存至THREE.js

if (navigator.geolocation) {
setInterval("enableGeolocation()",5000);
} else {
    alert("Geolocation is not supported by this browser.");
}

function enableGeolocation() {
navigator.geolocation.getCurrentPosition(showPosition);
}

function showPosition(position) {
    var latitude = position.coords.latitude;
    var longitude = position.coords.longitude;
}

HTML截取攝影機畫面

來源:http://www.html5rocks.com/en/tutorials/getusermedia/intro/

if (navigator.getUserMedia) {

    if (typeof MediaStreamTrack != 'undefined' && typeof MediaStreamTrack.getSources != 'undefined'){//Chrome 選擇後攝影機
      MediaStreamTrack.getSources(function gotSources(sourceInfos){
          var option = document.createElement("option");
          var hasRearCamera = false;
          for (var i = 0; i != sourceInfos.length; ++i) {
            var sourceInfo = sourceInfos[i];
            if (sourceInfo.kind === 'video') {
                if (!hasRearCamera) {
                    option.value = sourceInfo.id;
                    option.text = sourceInfo.label || 'camera ' + (videoSelect.length + 1);
                };
                if( sourceInfo.facing === 'environment' ) {
                    hasRearCamera = true;
                    option.value = sourceInfo.id;
                    option.text = sourceInfo.label || 'camera ' + (videoSelect.length + 1);
                    navigator.getUserMedia({video: { optional: [{sourceId: option.value}] }}, successCallback, errorCallback);
                }
            }
          }
          if (!hasRearCamera) {
            navigator.getUserMedia({video: { optional: [{sourceId: option.value}] }}, successCallback, errorCallback);
          }
      });
    }else{
        navigator.getUserMedia({video: true}, successCallback, errorCallback);
    }
 
} else {
    sendError('Native web camera streaming (getUserMedia) not supported in this browser.');
}

HTML5 + WebGL 實作小筆記

1.
(1) iOS 7 以前(包含),無法使用瀏覽器取得攝影機畫面。(navigator.getUserMedia函式)
(2) Chrome on android 可以用程式抓出所有多媒體設備,並且判斷需要的設備做選擇,例如後攝影機。(判斷式:http://kanbear.blogspot.tw/2014/07/htmlthreejs_21.html)
(3) Firefox on android 無法以程式選擇需要的攝影機,在使用者授權攝影機使用時交由使用者決定攝影機。
(4) Opera on android 預設使用後攝影機。


星期四, 3月 27, 2014

在Mac顯示Android上Unity App的Log

1.開啟終端機

2.將adb拖入終端機會自動顯示路徑

3.出現路徑後加上" logcat -s Unity"

4.按下return

adb在SDK資料夾中

/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb