如何实现activex视频播放器 全屏-like realplay ie plugin(100分)

  • 主题发起人 主题发起人 a_abj
  • 开始时间 开始时间
A

a_abj

Unregistered / Unconfirmed
GUEST, unregistred user!
在ie里做了一个播放器
别的都解决了,视频算法是调的别人的sdk
怎么实现按一个件 全屏播放视频
不知怎么实现象 realplay 那种全屏
 
做一个独立的弹出窗口。
 
有例子么
我是做的弹出窗口,
activex是 w=300 h=300 等他弹出后
activex是放到了,可老是有w=300 h=300的东西盖在上面
之外的部分看不到
 
不需要用弹出窗口
var
Browser: IWebBrowser2;
Document: IHTMLDocument2;
Element: IHTMLElement;

with ActiveFormControl.ClientSite as IServiceProvider do
begin
OleCheck(QueryService(IWebbrowserApp,IWebbrowser2,Browser));
Document:=Browser.Document as IHTMLDocument2;
with Document.all do
begin
Str:=GUIDToString(CLASS_YOURACTIVEXFORM);
for i:=0 to length-1 do
begin
Element:=item(i,VarEmpty) as IHTMLElement;
if SameText(Element.tagName,'OBJECT') then
if SameText(Element.getAttribute('classid',0),
'CLSID:'+Copy(Str,2,StrLen(PChar(Str))-2)) then
break;
end;
end;
end;
//全屏
Browser.FullScreen:=True;
with Document.body do
begin
BodyScroll:=getAttribute('scroll',0)
//保存原始状态,还原时恢复
setAttribute('scroll','no',0);
end;
with Element do
begin
with Style do
begin
position:=getAttribute('position',0)
//保存原始状态,还原时恢复
zindex:=getAttribute('z-index',0);
visibility:=getAttribute('visibility',0);
left:=getAttribute('left',0);
top:=getAttribute('top',0);
width:=getAttribute('width',0);
height:=getAttribute('height',0);

setAttribute('position','absolute',0);
setAttribute('z-index','0',0);
setAttribute('visibility','visible',0);
setAttribute('left','0px',0);
setAttribute('top','0px',0);
setAttribute('width',InttoStr(Window.screen.width-1)+'px',0);
setAttribute('height',InttoStr(Window.screen.height-1)+'px',0);
end;
end;
//还原
Browser.FullScreen:=False;
Browser.ToolBar:=1;
with Element do
begin
with style do
begin
setAttribute('position',position,0);
setAttribute('z-index',zindex,0);
setAttribute('visibility',visibility,0);
setAttribute('left',left,0);
setAttribute('top',top,0);
setAttribute('width',width,0);
setAttribute('height',height,0);
end;
end;
with Document.body do
setAttribute('scroll',BodyScroll,0);
 
后退
顶部