|
最近一个项目关于远程教学的,里面涉及到视频和ppt的在线播放:
用到的技术有如下:
视频流媒体技术,ppt导出网页,图片和演示时间(以控制视频的播放点),当然还有其他的,如果你懂js,asp,php,流媒体,有兴趣的话可以联系我。
正文:准备阶段,演讲者坐到镜头前,点开旁边的笔记本上的PPT,同时打开幻灯片即时功能,开始讲解和演示PPT,注意一定要按照你讲话的内容来点击PPT,....演讲完毕,注意保存PPT。
处理:打开PPT文件,导出为html
点击宏,新建宏:运行如下代码:
Sub macrox()
Dim Nx As Shape
Dim X As Long
For X = 1 To ActivePresentation.Slides.Count
For Each Nx In ActivePresentation.Slides(X).Shapes
If Nx.Type = 14 Or Nx.Type = 1 Then Debug.Print Nx.TextFrame.TextRange.Text
Next
ActivePresentation.Slides(X).Export "D:" & X & ".JPG", ".JPG" '(注意修改保存位置)
Next
End Sub
这样图片导出来了,然后再次运行获得时间的宏,。。。。然后,就是用到网页制作技术来实现效果了,在这里我就讲vba和整个流程了,希望对大家有用。
补充:宏取得排练时间,导出开始时间和结束时间到图片名字:
Sub look()
'
' 宏由 zhen 创建,日期 2009-1-10。
'
Dim slideshap As Shape
Dim slideins As Long
Dim slidetimes()
Dim slidecount As Integer
Dim outplace, imgname As String
slidecount = ActivePresentation.Slides.Count
ReDim slidetimes(slidecount)
slidetimes(0) = 0
outplace = "D:Documents and SettingsAdministrator桌面imgs"
For slideins = 1 To ActivePresentation.Slides.Count
imgname = ""
For Each slideshap In ActivePresentation.Slides(slideins).Shapes
slidetimes(slideins) = ActivePresentation.Slides(slideins).SlideShowTransition.AdvanceTime
If slideshap.Type = 14 Or slideshap.Type = 1 Then
If slidetimes(slideins) > 0 Then
imgname = outplace & X & "[start-end]-[" & Int(slidetimes(slideins - 1)) & "-" & Int(slidetimes(slideins)) & "]" & ".JPG"
End If
Debug.Print slideshap.TextFrame.TextRange.Text
End If
Next
If imgname "" Then ActivePresentation.Slides(slideins).Export imgname, ".JPG"
Next
End Sub
|
|