- if( this._playForDuration ){\r
- this._rawObject.pause();\r
- this._rawObject.currentTime = 0.001;\r
- delete this._playForDuration;\r
+ if( !X_Audio_HTMLAudioWrapper_durationFix ){\r
+ this.duration = this._rawObject.duration * 1000;\r
+ } else\r
+ // Desktop Opera\r
+ if( this._rawObject.duration !== 1 / 0 ){\r
+ \r
+ console.log( this._rawObject.duration );\r
+ \r
+ this.duration = this._rawObject.duration * 1000;\r
+ \r
+ if( this._playForDuration === 0 ) this._playForDuration = 2;\r
+ \r
+ if( this._playForDuration === 1 ){\r
+ this._playForDuration = 2;\r
+ \r
+ console.log( 'Loaded ' + this._loaded );\r
+ \r
+ if( this._loaded ){\r
+ this._rawObject.currentTime = this._beginTime / 1000;\r
+ console.log( '設定 ' + this._beginTime );\r
+ return;\r
+ };\r
+ \r
+ this.proxy.asyncDispatch( 'loadedmetadata' );\r
+ this.proxy.asyncDispatch( 'loadeddata' );\r
+ this.proxy.asyncDispatch( 'canplay' );\r
+ this.proxy.asyncDispatch( 'canplaythrough' );\r
+ loaded = true;\r
+ console.log( 'Desktop Opera のための currentTime と duration の fix が完了' + this.duration );\r
+ \r
+ if( this.autoplay ){\r
+ this._rawObject.currentTime = this._beginTime / 1000; \r
+ } else {\r
+ // Opera12.17 WinXP で勝手に再生される不具合\r
+ // これで一応再生は止まる、、、\r
+ this._rawObject.src = '';\r
+ //this._rawObject.load(); \r
+ };\r
+ };\r