File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed
macos/ONLYOFFICE/Code/Controllers/Common Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ virtual void OnEvent(NSEditorApi::CAscCefMenuEvent* pRawEvent)
8787 if (pCefEvent) {
8888 senderId = pCefEvent->get_SenderId ();
8989 }
90-
90+
9191 switch (pEvent->m_nType ) {
9292 case ASC_MENU_EVENT_TYPE_CEF_CREATETAB: {
9393 NSEditorApi::CAscCreateTab *pData = (NSEditorApi::CAscCreateTab*)pEvent->m_pData ;
@@ -361,27 +361,16 @@ virtual void OnEvent(NSEditorApi::CAscCefMenuEvent* pRawEvent)
361361 break ;
362362 }
363363
364- case ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_START:
365- case ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_END: {
366- NSLog (@" MEDIA EVENT: %d " , pEvent->m_nType);
367- CAscApplicationManager * appManager = [NSAscApplicationWorker getAppManager ];
368- CCefView * pCefView = appManager->GetViewById (pRawEvent->get_SenderId ());
369-
364+ case ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_PLAYER_COMMAND: {
365+ CAscApplicationManager* appManager = [NSAscApplicationWorker getAppManager ];
366+ CCefView* pCefView = appManager->GetViewById (pRawEvent->get_SenderId ());
370367 if (pCefView)
371368 {
372369 CCefViewWidgetImpl* pWidgetImpl = pCefView->GetWidgetImpl ();
373-
374370 if (pWidgetImpl)
375371 {
376372 CCefViewMedia* pCefViewMedia = static_cast <CCefViewMedia*>(pWidgetImpl);
377- if (pEvent->m_nType == ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_START)
378- {
379- pCefViewMedia->OnMediaStart (static_cast <NSEditorApi::CAscExternalMedia*>(pEvent->m_pData ));
380- }
381- else
382- {
383- pCefViewMedia->OnMediaEnd ();
384- }
373+ pCefViewMedia->OnMediaPlayerCommand (static_cast <NSEditorApi::CAscExternalMediaPlayerCommand*>(pEvent->m_pData ));
385374 }
386375 }
387376
You can’t perform that action at this time.
0 commit comments