@@ -72,6 +72,16 @@ Represents an audio clip on a slide.
72
72
| [setLinkPathLong(String value)](#setLinkPathLong-java.lang.String-) | Returns or sets the name of an audio file which is linked to an AudioFrame. |
73
73
| [getEmbeddedAudio()](#getEmbeddedAudio--) | Returns or sets embedded audio object. |
74
74
| [setEmbeddedAudio(IAudio value)](#setEmbeddedAudio-com.aspose.slides.IAudio-) | Returns or sets embedded audio object. |
75
+ | [getFadeInDuration()](#getFadeInDuration--) | Specifies the time duration for the starting fade of the media in milliseconds. |
76
+ | [setFadeInDuration(float value)](#setFadeInDuration-float-) | Specifies the time duration for the starting fade of the media in milliseconds. |
77
+ | [getFadeOutDuration()](#getFadeOutDuration--) | Specifies the time duration for the ending fade of the media in milliseconds. |
78
+ | [setFadeOutDuration(float value)](#setFadeOutDuration-float-) | Specifies the time duration for the ending fade of the media in milliseconds. |
79
+ | [getVolumeValue()](#getVolumeValue--) | Returns or sets the audio volume in percents. |
80
+ | [setVolumeValue(float value)](#setVolumeValue-float-) | Returns or sets the audio volume in percents. |
81
+ | [getTrimFromStart()](#getTrimFromStart--) | Specifies a duration of time to be removed from the start of the media during playback, in milliseconds. |
82
+ | [setTrimFromStart(float value)](#setTrimFromStart-float-) | Specifies a duration of time to be removed from the start of the media during playback, in milliseconds. |
83
+ | [getTrimFromEnd()](#getTrimFromEnd--) | Specifies a duration of time to be removed from the end of the media during playback, in milliseconds. |
84
+ | [setTrimFromEnd(float value)](#setTrimFromEnd-float-) | Specifies a duration of time to be removed from the end of the media during playback, in milliseconds. |
75
85
### getAudioCdStartTrack() {#getAudioCdStartTrack--}
76
86
```
77
87
public final int getAudioCdStartTrack()
@@ -430,3 +440,294 @@ Returns or sets embedded audio object. Read/write [IAudio](../../com.aspose.slid
430
440
| --- | --- | --- |
431
441
| value | [IAudio](../../com.aspose.slides/iaudio) | |
432
442
443
+ ### getFadeInDuration() {#getFadeInDuration--}
444
+ ```
445
+ public final float getFadeInDuration()
446
+ ```
447
+
448
+
449
+ Specifies the time duration for the starting fade of the media in milliseconds. Read/write float.
450
+
451
+ --------------------
452
+
453
+ > ```
454
+ > Example:
455
+ >
456
+ > Presentation pres = new Presentation();
457
+ > try {
458
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
459
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
460
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
461
+ > // Set the duration of the starting fade for 200ms
462
+ > audioFrame.setFadeInDuration(200f);
463
+ > pres.save("AudioFrameFade_out.pptx", SaveFormat.Pptx);
464
+ > } finally {
465
+ > if (pres != null) pres.dispose();
466
+ > }
467
+ > ```
468
+
469
+ **Returns:**
470
+ float
471
+ ### setFadeInDuration(float value) {#setFadeInDuration-float-}
472
+ ```
473
+ public final void setFadeInDuration(float value)
474
+ ```
475
+
476
+
477
+ Specifies the time duration for the starting fade of the media in milliseconds. Read/write float.
478
+
479
+ --------------------
480
+
481
+ > ```
482
+ > Example:
483
+ >
484
+ > Presentation pres = new Presentation();
485
+ > try {
486
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
487
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
488
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
489
+ > // Set the duration of the starting fade for 200ms
490
+ > audioFrame.setFadeInDuration(200f);
491
+ > pres.save("AudioFrameFade_out.pptx", SaveFormat.Pptx);
492
+ > } finally {
493
+ > if (pres != null) pres.dispose();
494
+ > }
495
+ > ```
496
+
497
+ **Parameters:**
498
+ | Parameter | Type | Description |
499
+ | --- | --- | --- |
500
+ | value | float | |
501
+
502
+ ### getFadeOutDuration() {#getFadeOutDuration--}
503
+ ```
504
+ public final float getFadeOutDuration()
505
+ ```
506
+
507
+
508
+ Specifies the time duration for the ending fade of the media in milliseconds. Read/write float.
509
+
510
+ --------------------
511
+
512
+ > ```
513
+ > Example:
514
+ >
515
+ > Presentation pres = new Presentation();
516
+ > try {
517
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
518
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
519
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
520
+ > // Set the duration of the ending fade for 500ms
521
+ > audioFrame.setFadeOutDuration(500f);
522
+ > pres.save("AudioFrameFade_out.pptx", SaveFormat.Pptx);
523
+ > } finally {
524
+ > if (pres != null) pres.dispose();
525
+ > }
526
+ > ```
527
+
528
+ **Returns:**
529
+ float
530
+ ### setFadeOutDuration(float value) {#setFadeOutDuration-float-}
531
+ ```
532
+ public final void setFadeOutDuration(float value)
533
+ ```
534
+
535
+
536
+ Specifies the time duration for the ending fade of the media in milliseconds. Read/write float.
537
+
538
+ --------------------
539
+
540
+ > ```
541
+ > Example:
542
+ >
543
+ > Presentation pres = new Presentation();
544
+ > try {
545
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
546
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
547
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
548
+ > // Set the duration of the ending fade for 500ms
549
+ > audioFrame.setFadeOutDuration(500f);
550
+ > pres.save("AudioFrameFade_out.pptx", SaveFormat.Pptx);
551
+ > } finally {
552
+ > if (pres != null) pres.dispose();
553
+ > }
554
+ > ```
555
+
556
+ **Parameters:**
557
+ | Parameter | Type | Description |
558
+ | --- | --- | --- |
559
+ | value | float | |
560
+
561
+ ### getVolumeValue() {#getVolumeValue--}
562
+ ```
563
+ public final float getVolumeValue()
564
+ ```
565
+
566
+
567
+ Returns or sets the audio volume in percents. Read/write float.
568
+
569
+ --------------------
570
+
571
+ > ```
572
+ > Example:
573
+ >
574
+ > Presentation pres = new Presentation();
575
+ > try {
576
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
577
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
578
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
579
+ > // Set the audio volume for 85%
580
+ > audioFrame.setVolumeValue(85f);
581
+ > pres.save("AudioFrameValue_out.pptx", SaveFormat.Pptx);
582
+ > } finally {
583
+ > if (pres != null) pres.dispose();
584
+ > }
585
+ > ```
586
+
587
+ **Returns:**
588
+ float
589
+ ### setVolumeValue(float value) {#setVolumeValue-float-}
590
+ ```
591
+ public final void setVolumeValue(float value)
592
+ ```
593
+
594
+
595
+ Returns or sets the audio volume in percents. Read/write float.
596
+
597
+ --------------------
598
+
599
+ > ```
600
+ > Example:
601
+ >
602
+ > Presentation pres = new Presentation();
603
+ > try {
604
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
605
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
606
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
607
+ > // Set the audio volume for 85%
608
+ > audioFrame.setVolumeValue(85f);
609
+ > pres.save("AudioFrameValue_out.pptx", SaveFormat.Pptx);
610
+ > } finally {
611
+ > if (pres != null) pres.dispose();
612
+ > }
613
+ > ```
614
+
615
+ **Parameters:**
616
+ | Parameter | Type | Description |
617
+ | --- | --- | --- |
618
+ | value | float | |
619
+
620
+ ### getTrimFromStart() {#getTrimFromStart--}
621
+ ```
622
+ public final float getTrimFromStart()
623
+ ```
624
+
625
+
626
+ Specifies a duration of time to be removed from the start of the media during playback, in milliseconds. Read/write float.
627
+
628
+ --------------------
629
+
630
+ > ```
631
+ > Example:
632
+ >
633
+ > Presentation pres = new Presentation();
634
+ > try {
635
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
636
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
637
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
638
+ > // Set the start trimming time 1.5 seconds
639
+ > audioFrame.setTrimFromStart(1500f);
640
+ > } finally {
641
+ > if (pres != null) pres.dispose();
642
+ > }
643
+ > ```
644
+
645
+ **Returns:**
646
+ float
647
+ ### setTrimFromStart(float value) {#setTrimFromStart-float-}
648
+ ```
649
+ public final void setTrimFromStart(float value)
650
+ ```
651
+
652
+
653
+ Specifies a duration of time to be removed from the start of the media during playback, in milliseconds. Read/write float.
654
+
655
+ --------------------
656
+
657
+ > ```
658
+ > Example:
659
+ >
660
+ > Presentation pres = new Presentation();
661
+ > try {
662
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
663
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
664
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
665
+ > // Set the start trimming time 1.5 seconds
666
+ > audioFrame.setTrimFromStart(1500f);
667
+ > } finally {
668
+ > if (pres != null) pres.dispose();
669
+ > }
670
+ > ```
671
+
672
+ **Parameters:**
673
+ | Parameter | Type | Description |
674
+ | --- | --- | --- |
675
+ | value | float | |
676
+
677
+ ### getTrimFromEnd() {#getTrimFromEnd--}
678
+ ```
679
+ public final float getTrimFromEnd()
680
+ ```
681
+
682
+
683
+ Specifies a duration of time to be removed from the end of the media during playback, in milliseconds. Read/write float.
684
+
685
+ --------------------
686
+
687
+ > ```
688
+ > Example:
689
+ >
690
+ > Presentation pres = new Presentation();
691
+ > try {
692
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
693
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
694
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
695
+ > // Set the end trimming time 2 seconds
696
+ > audioFrame.setTrimFromEnd(2000f);
697
+ > } finally {
698
+ > if (pres != null) pres.dispose();
699
+ > }
700
+ > ```
701
+
702
+ **Returns:**
703
+ float
704
+ ### setTrimFromEnd(float value) {#setTrimFromEnd-float-}
705
+ ```
706
+ public final void setTrimFromEnd(float value)
707
+ ```
708
+
709
+
710
+ Specifies a duration of time to be removed from the end of the media during playback, in milliseconds. Read/write float.
711
+
712
+ --------------------
713
+
714
+ > ```
715
+ > Example:
716
+ >
717
+ > Presentation pres = new Presentation();
718
+ > try {
719
+ > FileInputStream audioStream = new FileInputStream("sampleaudio.mp3");
720
+ > IAudio audio = pres.getAudios().addAudio(audioStream, LoadingStreamBehavior.ReadStreamAndRelease);
721
+ > IAudioFrame audioFrame = pres.getSlides().get_Item(0).getShapes().addAudioFrameEmbedded(50, 50, 100, 100, audio);
722
+ > // Set the end trimming time 2 seconds
723
+ > audioFrame.setTrimFromEnd(2000f);
724
+ > } finally {
725
+ > if (pres != null) pres.dispose();
726
+ > }
727
+ > ```
728
+
729
+ **Parameters:**
730
+ | Parameter | Type | Description |
731
+ | --- | --- | --- |
732
+ | value | float | |
733
+
0 commit comments