我使用按钮和ActiveX Windows Media Player创建了一个GUI。单击该按钮时,视频仅播放音频,Windows Media Player上不显示任何视频。为什么会这样?
function playButton_Callback(hObject, eventdata, handles)
% hObject handle to playButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.activex1.URL = 'Test.mp4';
答案 0 :(得分:0)
尝试“handles.activex1.controls.play”。它适用于我的情况。
答案 1 :(得分:0)
试试这段代码:
m=figure
actx = actxcontrol('WMPlayer.ocx.7',[40,20,285,350],m); % Create Controller
actx.URL=[VideoPath VideoName]; % Create Media object
actx.controls.play