問題是這樣的:前幾天我在網上下了一個外掛程式jrecorder,這是一個不需要任何flash編程技術就可以實現線上錄音的jquery外掛程式,但問題出現了,我在http://www.sajithmr.me/jrecorder/exam... 上下了外掛程式,也按照提示把外掛程式裝在本機伺服器上,但是老是出錯:Uncaught TypeError: Object # has no method 'jStartRecording' ;jStartRecording函數在jrecorder.js中:
//function call to start a recording$.jRecorder.record = function(max_time){//change z-index to make it top$( '#' + jRecorderSettings['recorderlayout_id'] ).css('z-index', 1000); getFlashMovie(jRecorderSettings['recorder_name']).jStartRecording(max_time);}
本地測試時使用的代碼:
jRecorder Example Time: 00:00 Level: Status:
我查看了網上那個樣本的原始碼,發現和我本地上的代碼沒有區別,所以真的很鬱悶,到底哪裡出錯了?
回複內容:
問題是這樣的:前幾天我在網上下了一個外掛程式jrecorder,這是一個不需要任何flash編程技術就可以實現線上錄音的jquery外掛程式,但問題出現了,我在http://www.sajithmr.me/jrecorder/exam... 上下了外掛程式,也按照提示把外掛程式裝在本機伺服器上,但是老是出錯:Uncaught TypeError: Object # has no method 'jStartRecording' ;jStartRecording函數在jrecorder.js中:
//function call to start a recording$.jRecorder.record = function(max_time){//change z-index to make it top$( '#' + jRecorderSettings['recorderlayout_id'] ).css('z-index', 1000); getFlashMovie(jRecorderSettings['recorder_name']).jStartRecording(max_time);}
本地測試時使用的代碼:
jRecorder Example Time: 00:00 Level: Status:
我查看了網上那個樣本的原始碼,發現和我本地上的代碼沒有區別,所以真的很鬱悶,到底哪裡出錯了?
把所有JS代碼放到$(function() { ~~~~~~~~放置jRecorder代碼~~~~~~~~~~~ })
解決了沒有?