jitsi-meet 聯合jibri錄制虛擬機搭建踩坑記錄


jitsi-meet 是一個基於Java的時評會議框架,官方文檔在搭建時並沒有提到虛擬機搭建的,所以在沒有域名進行搭建的過程中漏洞百出,所以特地留下這個踩坑記錄:

問題一: 找不到localStorage

Jibri recording failed Failed to read the 'localStorage' property from 'Window': Access is denied for this document

這個問題是訪問服務器谷歌瀏覽器訪問https協議網址導致的,可以通過兩種方法解決,先說比較靠譜的一種

A:

在chromeDriver啟動之前添加參數,使其不出現警告頁面,修改JibriSelenium.kt文件

這是原來的代碼

logPrefs.enable(LogType.DRIVER, Level.ALL)
chromeOptions.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)
chromeDriver = ChromeDriver(chromeDriverService, chromeOptions)
chromeDriver.manage().timeouts().pageLoadTimeout(60,TimeUnit.SECONDS)

 

 
        

這是修改后的:

logPrefs.enable(LogType.DRIVER, Level.ALL)
chromeOptions.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)
chromeOptions.addArguments("--ignore-certificate-errors")//修改
chromeDriver = ChromeDriver(chromeDriverService, chromeOptions)
chromeDriver.manage().timeouts().pageLoadTimeout(60,TimeUnit.SECONDS)

 

 
        

另一種就比較直接了 ,直接在chromeDriver訪問鏈接的時候將其改成http協議連接,可能有效,但不建議這么做:

B:

在JibriSelenium.kt中的joinCall()方法中將訪問鏈接修改:

原本的代碼:

HomePage(chromeDriver).visit(callUrlInfo.baseUrl)
val localStorageValues = mutableMapOf(
        "displayname" to jibriSeleniumOptions.displayName,
        "email" to jibriSeleniumOptions.email,
        "callStatsUserName" to "jibri"
)
 
        

修改后的代碼:

HomePage(chromeDriver).visit("http://127.0.0.1")
 
val localStorageValues = mutableMapOf(
        "displayname" to jibriSeleniumOptions.displayName,
        "email" to jibriSeleniumOptions.email,
        "callStatsUserName" to "jibri"
)

 

 
        

問題二:App is not define

前台問題,更改JibriSelenium.kt中的訪問方式即可:

原代碼:

if (!CallPage(chromeDriver).visit(callUrlInfo.callUrl)){

             stateMachine.transition(SeleniumEvent.FailedToJoinCall)
               

} else {

 

修改后代碼:

if (!HomePage(chromeDriver).visit(callUrlInfo.callUrl)) {

             stateMachine.transition(SeleniumEvent.FailedToJoinCall)
               

} else {

 

 

以上兩個問題無非是程序在使用linux系統下的谷歌瀏覽器訪問會議界面遇到的前端問題,於整個程序運行而言無關緊要,可以先跑起來再去深入研究框架

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM