Closed EricWhiteDev closed 7 years ago
Closing issue. Fix contained in PR #140.
@tomjebo: Will you make sure to get this into vNext again now that v2.7 is out? How is the timeline for getting this in a release? It was more than a year between v2.6 and v2.7, after all, and we need this quite a bit.
@kimsey0 Sorry for the delay in responding. Yes, we did add this and then revert. Now that 2.7.1 is done, we will add this fix back in. A PR will likely be submitted next week. Thanks for asking.
@tomjebo: Great. Thanks.
Does anyone know what happened with this? I still can't find any reference to MP4 in the MediaDataPartType or MediaDataPartTypeInfo classes. Am I looking in the wrong place?
From a forum post:
Please take a look at the code I got from PresentationBuilder::CopyRelatedMedia and the definition of DocumentFormat.OpenXml.Packaging.MediaDataPartType.
Since MediaDataPartType doesn't have mp4 in its enumeration, PowerTools GetMediadataPartTypeFromContentType uses the default value - MediaDataPartType.Wmv - as mp4 media type. That is why mp4 file cannot be played correctly.
I can play my mp4 in my original pptx. I converted my mp4 to .avi file and inserted it in my original pptx. Both .mp4 and .avi can play. After copied version generated, only .avi file can play, but .mp4 gives the error "Codec Unavailable".
From Eric White: This needs a member added to MediaDataPartType.
private static MediaDataPartType GetMediadataPartTypeFromContentType(string ct) { MediaDataPartType mdpt = MediaDataPartType.Wmv;
namespace DocumentFormat.OpenXml.Packaging { // Summary: // Defines part media types. public enum MediaDataPartType { // Summary: // Audio Interchange File Format (.aiff) Aiff = 0, // // Summary: // MIDI Audio (.mid) Midi = 1, // // Summary: // MP3 (.mp3) Mp3 = 2, // // Summary: // MP3 Playlist File (.m3u) MpegUrl = 3, // // Summary: // WAV audio (.wav) Wav = 4, // // Summary: // Windows Media Audio File (.wma) Wma = 5, // // Summary: // Mpeg audio (.mpeg) MpegAudio = 6, // // Summary: // Ogg Vorbis (.ogg) OggAudio = 7, // // Summary: // Advanced Stream Redirector File (.asx) Asx = 8, // // Summary: // Audio Video Interleave File (.avi) Avi = 9, // // Summary: // MPEG 1 System Stream (.mpg) Mpg = 10, // // Summary: // MPEG 1 System Stream (.mpeg) MpegVideo = 11, // // Summary: // Windows Media File (.wmv) Wmv = 12, // // Summary: // Windows Media Player A/V Shortcut (.wmx) Wmx = 13, // // Summary: // Windows Media Redirector (.wvx) Wvx = 14, // // Summary: // QuickTime video (.mov) Quicktime = 15, // // Summary: // Ogg Stream (.ogg) OggVideo = 16, // // Summary: // VC-1 Stream (.wmv) VC1 = 17, } }